|
@ -142,6 +142,25 @@ public class BShip { |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
textArea.setText(grid2.getText()); |
|
|
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(); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|