mirror of
https://github.com/lov3b/Schack.git
synced 2025-01-18 12:50:10 +01:00
kommentarer
This commit is contained in:
parent
8c9d97644c
commit
36469b2fd0
@ -108,6 +108,7 @@ public class Board extends JPanel implements MouseListener {
|
||||
try {
|
||||
Piece p = pieces[selectedPiece.x][selectedPiece.y];
|
||||
p.move(pieces, clicked, selectedPiece);
|
||||
|
||||
} catch (Exception e) {
|
||||
validMovesToDraw.clear();
|
||||
}
|
||||
@ -117,7 +118,7 @@ public class Board extends JPanel implements MouseListener {
|
||||
validMovesToDraw.clear();
|
||||
}
|
||||
|
||||
System.out.println("X: " + mouseCoordinateX + ", Y: " + mouseCoordinateY);
|
||||
|
||||
if (!validMovesToDraw.contains(clicked)) {
|
||||
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user