mirror of
				https://github.com/lov3b/Schack.git
				synced 2025-11-03 22:50:24 +01:00 
			
		
		
		
	Lägg till en fråga ifall man vill starta om vid schackmatt
This commit is contained in:
		@@ -140,7 +140,11 @@ public class Board extends JPanel implements MouseListener {
 | 
			
		||||
                        if (weCanMove) {
 | 
			
		||||
                            JOptionPane.showMessageDialog(this, "Du står i schack");
 | 
			
		||||
                        } else {
 | 
			
		||||
                            JOptionPane.showMessageDialog(this, "Schackmatt");
 | 
			
		||||
                            int choise = JOptionPane.showConfirmDialog(this, "Schackmatt\nVill du starta om?");
 | 
			
		||||
                            if (choise == JOptionPane.YES_OPTION) {
 | 
			
		||||
                                this.pieces = initPieces();
 | 
			
		||||
                                whitesTurn = true;
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
                        inSchack = true;
 | 
			
		||||
                    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user