added rotate to structure

This commit is contained in:
Niklas Kapelle 2023-11-16 01:38:40 +01:00
parent f9c10cfc0b
commit 7f8c0d154c
Signed by: niklas
GPG Key ID: 4EB651B36D841D16

View File

@ -10,6 +10,10 @@ abstract Structure(Array<Layer>) from Array<Layer> {
public inline function height():Int {
return this.length;
}
public function rotate():Structure {
return [for (i in 0...height()) this[i].rotate()];
}
}
abstract Layer(Array<Array<Block>>) from Array<Array<Block>> {