dartterm/lib/world/level.dart

24 lines
355 B
Dart
Raw Normal View History

2023-09-23 00:55:29 +00:00
import 'package:dartterm/bitmap.dart';
import 'package:dartterm/algorithms/geometry.dart' as geo;
2023-09-18 01:05:40 +00:00
class Level {
2023-09-23 00:55:29 +00:00
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,
2023-09-18 01:05:40 +00:00
}