mirror of
https://github.com/lov3b/Schack.git
synced 2025-12-14 08:10:08 +01:00
gör getCastleMove mer tydlig
This commit is contained in:
@@ -146,12 +146,12 @@ public class Board extends JPanel implements MouseListener {
|
||||
continue;
|
||||
}
|
||||
if (attacked.supremeRuler) {
|
||||
validMovesToDraw.clear();
|
||||
getParent().repaint();
|
||||
// Kolla ifall vi är i schackmatt
|
||||
if (weCanMove) {
|
||||
JOptionPane.showMessageDialog(this, "Du står i schack");
|
||||
} else {
|
||||
validMovesToDraw.clear();
|
||||
getParent().repaint();
|
||||
int choise = JOptionPane.showConfirmDialog(this, "Schackmatt\nVill du starta om?");
|
||||
if (choise == JOptionPane.YES_OPTION) {
|
||||
restartGame();
|
||||
|
||||
Reference in New Issue
Block a user