Boo
This commit is contained in:
parent
ce2f481729
commit
5f8d4f269a
|
|
@ -265,7 +265,12 @@ public class MyInterface extends JFrame {
|
||||||
/*if (game != null && game.isCheckmate(true)) {
|
/*if (game != null && game.isCheckmate(true)) {
|
||||||
String winner = turnIsWhite ? "Black" : "White"; // since it's mate, last move won
|
String winner = turnIsWhite ? "Black" : "White"; // since it's mate, last move won
|
||||||
JOptionPane.showMessageDialog(this, "Checkmate! " + winner + " wins.", "Game Over", JOptionPane.INFORMATION_MESSAGE);
|
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();
|
this.repaint();
|
||||||
}
|
}
|
||||||
|
|
@ -276,5 +281,6 @@ public class MyInterface extends JFrame {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue