Esempio n. 1
0
 public HitResults Fire(int row, int column)
 {
     foreach (Ship ship in m_ships)
     {
         HitResults result = ship.Fire(row, column);
         if (result != HitResults.Missed)
         {
             if (result == HitResults.Sunk)
                 m_lastSunkenShip = ship;
             return result;
         }
     }
     return HitResults.Missed;
 }
Esempio n. 2
0
 public void AddShip(Ship ship)
 {
     m_ships.Add(ship);
 }