Browse Source

update

main
fdai4581 2 years ago
parent
commit
9f8c1d288f
  1. 9
      src/main/java/BattleShip/BShip.java

9
src/main/java/BattleShip/BShip.java

@ -133,7 +133,16 @@ public class BShip {
if(grid1.getEndGame() || grid2.getEndGame()) { if(grid1.getEndGame() || grid2.getEndGame()) {
grid1.setEndGame(); grid1.setEndGame();
} else {
if(grid2.areShipsPlaced()) {
shipsPlaced = true;
synchronized (lock) {
lock.notifyAll();
}
} else {
textArea.setText(grid2.getText());
}
} }
} }
} }

Loading…
Cancel
Save