dartterm/lib/gen/vault.dart

37 lines
751 B
Dart
Raw Normal View History

part of 'generator.dart';
class Vault {
final Bitmap<VaultTile> tiles;
final DirectionSet smooth;
geo.Size get size => tiles.size;
int get vx => size.dx;
int get vy => size.dy;
Vault(this.tiles, this.smooth);
static Vault blank(int vx, int vy, VaultTile lt, DirectionSet smooth) {
return Vault(Bitmap.blank(vx, vy, lt), smooth);
}
2023-09-21 03:56:30 +00:00
void clear(VaultTile lt) {
tiles.clear(lt);
}
void blitFrom(Vault other, int dx, int dy) {
tiles.blitFrom(other.tiles, dx, dy);
}
Vault flip() {
return Vault(tiles.flip(), smooth.flip());
}
Vault rotateRight() {
return Vault(tiles.rotateRight(), smooth.rotateRight());
}
Vault rotateLeft() {
return Vault(tiles.rotateLeft(), smooth.rotateLeft());
}
}