dartterm/lib/world/level.dart
2023-09-22 17:55:29 -07:00

24 lines
355 B
Dart

import 'package:dartterm/bitmap.dart';
import 'package:dartterm/algorithms/geometry.dart' as geo;
class Level {
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,
}