wip-fix-ai-players #25

Merged
lgc merged 11 commits from wip-fix-ai-players into main 2024-12-23 19:15:00 +00:00
1 changed files with 10 additions and 0 deletions
Showing only changes of commit 9d51e708e5 - Show all commits

View File

@ -134,6 +134,12 @@ public class MainFrame extends JFrame {
if(player != gameBoard.getP1()){
return;
}
this.gameBoard.getP1().destroy();
this.gameBoard.getP2().destroy();
this.gameBoard.removeAll();
this.gameBoard = null;
WinScreen winScreen = new WinScreen(this);
mainPanel.add(winScreen, panelName);
mainPanel.revalidate();
@ -151,8 +157,12 @@ public class MainFrame extends JFrame {
if(player != gameBoard.getP1()){
return;
}
this.gameBoard.getP1().destroy();
this.gameBoard.getP2().destroy();
this.gameBoard.removeAll();
this.gameBoard = null;
LoseScreen looseScreen = new LoseScreen(this);
mainPanel.add(looseScreen,panelName);
mainPanel.revalidate();