public void AddTank(Tank tank) { BoardTile tile = Board.GetRandomEmptyTile(); tile.OccupiedByTank = tank; tanks.Add(tank); }
public GameBoard(int rows, int columns) { Id = Guid.NewGuid(); tileGrid = new BoardTile[rows, columns]; foreach (int rowNum in Enumerable.Range(0, rows)) { foreach (int colNum in Enumerable.Range(0, columns)) { BoardTile tile = new BoardTile(rowNum, colNum); tileGrid[rowNum, colNum] = tile; } } }