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