added some rules can only move if its highlighted

This commit is contained in:
Tikea TE 2025-05-06 16:12:48 +02:00
parent e296422c81
commit 595d20069f
1 changed files with 2 additions and 2 deletions

View File

@ -154,8 +154,8 @@ public class Board {
}
}
// 2) If no piece is currently selected, try to select one
if (!hasSelection) {
// 2) If no piece is currently selected, try to select one
if (!hasSelection) { // hasSeletion is false at the beginning
if (clicked != null && clicked.isWhite() == turnWhite) {
// mark that we have a selection
hasSelection = true;