This commit is contained in:
aelga 2025-05-16 13:17:42 +02:00
parent ce2f481729
commit 5f8d4f269a
1 changed files with 7 additions and 1 deletions

View File

@ -265,6 +265,11 @@ public class MyInterface extends JFrame {
/*if (game != null && game.isCheckmate(true)) {
String winner = turnIsWhite ? "Black" : "White"; // since it's mate, last move won
JOptionPane.showMessageDialog(this, "Checkmate! " + winner + " wins.", "Game Over", JOptionPane.INFORMATION_MESSAGE);
game.setDefaultSetup(); // resets the board setup
turnLabel.setText("Turn : 1, White");
actionLabel.setText("Game reset after checkmate");
repaint();
return; // skip repaint below as we already called it
}*/
this.repaint();
@ -276,5 +281,6 @@ public class MyInterface extends JFrame {
}