reposition tanks on map switch, rework map logic

This commit is contained in:
Vinzenz Schroeter 2024-05-03 15:47:33 +02:00 committed by RobbersDaughter
parent 3d65c81b8b
commit 97144ae3b8
13 changed files with 208 additions and 117 deletions

View file

@ -26,5 +26,17 @@ internal sealed class Sprite(bool?[,] data)
public bool? this[int x, int y] => data[x, y];
public int Width => data.GetLength(0);
public int Height => data.GetLength(1);
public bool[,] ToBoolArray()
{
var result = new bool[Width, Height];
for (var y = 0; y < Height; y++)
for (var x = 0; x < Width; x++)
result[x, y] = this[x, y] ?? false;
return result;
}
}