|
@ -150,6 +150,7 @@ public class BShip { |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
textArea.setText(grid2.getText()); |
|
|
textArea.setText(grid2.getText()); |
|
|
|
|
|
} |
|
|
if(grid1.getClicked()) { |
|
|
if(grid1.getClicked()) { |
|
|
|
|
|
|
|
|
textArea.setText(grid1.getText()); |
|
|
textArea.setText(grid1.getText()); |
|
@ -169,7 +170,7 @@ public class BShip { |
|
|
|
|
|
|
|
|
grid1.setClicked(); |
|
|
grid1.setClicked(); |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -182,8 +183,7 @@ public class BShip { |
|
|
synchronized (lock) { |
|
|
synchronized (lock) { |
|
|
try { |
|
|
try { |
|
|
lock.wait(); |
|
|
lock.wait(); |
|
|
} catch (InterruptedException e) { |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} catch (InterruptedException e) {} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
grid1.enableCells(); |
|
|
grid1.enableCells(); |
|
|