Ejemplo n.º 1
0
 public bool AllShipsDestroyed()
 {
     for (int i = 0; i < gridSizeX; i++)
     {
         for (int j = 0; j < gridSizeY; j++)
         {
             TileScript thisTile = grid[i, j].GetComponent <TileScript>();
             if (thisTile.HasShip() && !thisTile.IsAttacked())
             {
                 return(false);
             }
         }
     }
     return(true);
 }