diff --git a/src/windowInterface/MyInterface.java b/src/windowInterface/MyInterface.java index 2c21dce..9d7a0a4 100644 --- a/src/windowInterface/MyInterface.java +++ b/src/windowInterface/MyInterface.java @@ -265,7 +265,12 @@ 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(); } @@ -275,6 +280,7 @@ public class MyInterface extends JFrame { } + }