示例#1
0
 /**
  * Check whether player won or not.
  *
  * @return
  */
 public boolean didPlayerWin() {
   for (BattleShip ship : rightShips) if (!ship.isDestroyed()) return false;
   return true;
 }
示例#2
0
 /**
  * Check whether computer won or not.
  *
  * @return
  */
 public boolean didComputerWin() {
   for (BattleShip ship : leftShips) if (!ship.isDestroyed()) return false;
   return true;
 }