Working through some localization stuff will probably be pretty fluid.
This commit is contained in:
2020-12-14 16:08:59 -07:00
parent 2c5f0b73b9
commit d63066c150
19 changed files with 199 additions and 258 deletions

View File

@@ -5,16 +5,27 @@ namespace ConsoleApp.Maps
{
public class SquareMap : ISquareMap
{
public SquareCell[,] Map { get;}
public Cell[,] Map { get;}
public ICell StartingCell { get; }
public ICell LastCell { get; }
public SquareMap(int x, int y)
{
Map = new SquareCell[x,y];
//convert to cm
x *= 100;
y *= 100;
//calculate number of cells on x and y axis
var xCellCount = (int)Math.Ceiling((decimal) (x) / 25);
var yCellCount = (int)Math.Ceiling((decimal) (y) / 25);
//set last cell;
StartingCell = Map[0, 0];
Map = new Cell[xCellCount, yCellCount];
for (int i = 0; i < x; i++)
{
for (int j = 0; j < y; j++)
{
Map[i,j] = new SquareCell(i, j);
Map[i,j] = new Cell(i, j);
}
}
}