Ejemplo n.º 1
0
        public void AddTank(Tank tank)
        {
            BoardTile tile = Board.GetRandomEmptyTile();

            tile.OccupiedByTank = tank;
            tanks.Add(tank);
        }
Ejemplo n.º 2
0
 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;
         }
     }
 }