Well, it's sort of working

This commit is contained in:
2023-09-20 20:56:30 -07:00
parent b5466919e6
commit c4c2b26653
13 changed files with 217 additions and 115 deletions

View File

@ -1,29 +1,3 @@
enum LevelTile {
exit,
door,
floor,
wall,
}
class Level {
Set<(int, int)> openCells = {};
}
LevelTile colorToTile(int c) {
switch (c) {
// ABGR
case 0xFF000000:
case 0xFF707070:
return LevelTile.wall;
case 0xFFFFFFFF:
case 0xFF00FFFF:
case 0xFFFF00FF:
return LevelTile.floor;
case 0xFFFF8700:
return LevelTile.door;
case 0xFF0000FF:
return LevelTile.exit;
default:
throw Exception("unrecognized pixel: $c");
}
}