|
|
@ -6,7 +6,7 @@ import java.awt.event.ActionEvent; |
|
|
|
import java.awt.event.ActionListener; |
|
|
|
|
|
|
|
public class BShip { |
|
|
|
|
|
|
|
Object lock = new Object(); |
|
|
|
public GridGUI grid1; |
|
|
|
JPanel thePanel = new JPanel(); |
|
|
|
JPanel textPanel = new JPanel(); |
|
|
@ -126,5 +126,16 @@ public class BShip { |
|
|
|
startGame(); |
|
|
|
} |
|
|
|
} |
|
|
|
public class IncomingGuessReader implements Runnable { |
|
|
|
|
|
|
|
public void run() { |
|
|
|
while(grid1 != null && grid2 != null) { |
|
|
|
|
|
|
|
if(grid1.getEndGame() || grid2.getEndGame()) { |
|
|
|
grid1.setEndGame(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |