game-end-stuff #29

Merged
lgc merged 3 commits from game-end-stuff into main 2024-12-23 22:13:58 +00:00
2 changed files with 3 additions and 2 deletions
Showing only changes of commit 8dd697bb66 - Show all commits

View File

@ -155,6 +155,7 @@ public abstract class AiPlayer extends LocalPlayer implements Runnable {
while(i.hasNext()) {
Thread thread = i.next();
try {
thread.interrupt();
thread.join();
i.remove();
} catch (InterruptedException e) {

View File

@ -129,7 +129,7 @@ public class MainFrame extends JFrame {
* @author Lucas Bronson, Peer Ole Wachtel, Luca Conte
*/
public void showPanelWin(String panelName, Player player){
if(player != gameBoard.getP1()){
if(gameBoard == null || player != gameBoard.getP1()){
return;
}
@ -152,7 +152,7 @@ public class MainFrame extends JFrame {
* @author Lucas Bronson, Peer Ole Wachtel, Luca Conte
*/
public void showPanelLose(String panelName, Player player){
if(player != gameBoard.getP1()){
if(gameBoard == null || player != gameBoard.getP1()){
return;
}