Updated again

This commit is contained in:
Lymeng LY 2025-05-09 09:24:59 +02:00
parent 14f88abd3d
commit 82ec202ad3
1 changed files with 9 additions and 8 deletions

View File

@ -196,7 +196,7 @@ public class Board {
break; break;
} }
} }
}
// Only move the piece if the destination is valid // Only move the piece if the destination is valid
if (isValidMove) { if (isValidMove) {
movePiece(selectedX, selectedY, x, y); movePiece(selectedX, selectedY, x, y);
@ -225,6 +225,7 @@ public class Board {
this.selectedPosition = null; this.selectedPosition = null;
highlightedPositions.clear();//Clear after move highlightedPositions.clear();//Clear after move
} }
} }