Browse Source

update

main
fdai4581 2 years ago
parent
commit
4ef3fb4be8
  1. 19
      src/main/java/BattleShip/BShip.java

19
src/main/java/BattleShip/BShip.java

@ -142,6 +142,25 @@ public class BShip {
}
} else {
textArea.setText(grid2.getText());
if(grid1.getClicked()) {
textArea.setText(grid1.getText());
try {
Thread.sleep(2000);
} catch (InterruptedException ex) {
ex.printStackTrace();
}
if (!grid1.getEndGame()) {
grid2.go();
textArea.setText(grid2.getText());
} else {
textArea.setText(grid1.getText());
}
grid1.setClicked();
}
}
}
}

Loading…
Cancel
Save