From 595d20069f26d1f58fbb1f2dd8f95ccf39b156bb Mon Sep 17 00:00:00 2001 From: Tikea TE Date: Tue, 6 May 2025 16:12:48 +0200 Subject: [PATCH] added some rules can only move if its highlighted --- OOP_group1A1_project/src/backend/Board.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OOP_group1A1_project/src/backend/Board.java b/OOP_group1A1_project/src/backend/Board.java index 7994651..aacabcc 100644 --- a/OOP_group1A1_project/src/backend/Board.java +++ b/OOP_group1A1_project/src/backend/Board.java @@ -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;