kommentarer

This commit is contained in:
k1ntas 2022-03-29 15:49:28 +02:00
parent 8c9d97644c
commit 36469b2fd0

View File

@ -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 {