24 lines
355 B
Dart
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,
|
|
}
|