Exit vaults, level type
This commit is contained in:
@ -1,3 +1,23 @@
|
||||
import 'package:dartterm/bitmap.dart';
|
||||
import 'package:dartterm/algorithms/geometry.dart' as geo;
|
||||
|
||||
class Level {
|
||||
Set<(int, int)> openCells = {};
|
||||
Bitmap<LevelTile> tiles;
|
||||
geo.Offset spawn;
|
||||
|
||||
geo.Size get size => tiles.size;
|
||||
|
||||
Level(this.tiles, this.spawn) {
|
||||
assert(tiles.rect.containsPoint(spawn));
|
||||
}
|
||||
}
|
||||
|
||||
enum LevelTile {
|
||||
exit,
|
||||
|
||||
floor,
|
||||
wall,
|
||||
|
||||
closedDoor,
|
||||
openDoor,
|
||||
}
|
||||
|
Reference in New Issue
Block a user