added some rules can only move if its highlighted
This commit is contained in:
parent
e296422c81
commit
595d20069f
|
|
@ -154,8 +154,8 @@ public class Board {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2) If no piece is currently selected, try to select one
|
// 2) If no piece is currently selected, try to select one
|
||||||
if (!hasSelection) {
|
if (!hasSelection) { // hasSeletion is false at the beginning
|
||||||
if (clicked != null && clicked.isWhite() == turnWhite) {
|
if (clicked != null && clicked.isWhite() == turnWhite) {
|
||||||
// mark that we have a selection
|
// mark that we have a selection
|
||||||
hasSelection = true;
|
hasSelection = true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue