From 2e97528c7524e22e57ba27f51a44558a73fdac8a Mon Sep 17 00:00:00 2001 From: fiore Date: Mon, 17 Mar 2025 10:59:10 +0900 Subject: [PATCH] =?UTF-8?q?DO-31=20Feat:=20=EC=9D=B4=EC=A0=84=EC=97=90=20?= =?UTF-8?q?=ED=91=9C=EC=8B=9C=ED=96=88=EB=8D=98=20=EA=B8=88=EC=88=98=20?= =?UTF-8?q?=EB=A7=88=ED=81=AC=20=EC=A0=9C=EA=B1=B0=20=ED=95=A8=EC=88=98=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Script/Game/GameLogic.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Assets/Script/Game/GameLogic.cs b/Assets/Script/Game/GameLogic.cs index 8ff638f..cc3b28c 100644 --- a/Assets/Script/Game/GameLogic.cs +++ b/Assets/Script/Game/GameLogic.cs @@ -117,7 +117,7 @@ public class GameLogic : MonoBehaviour private void UpdateForbiddenMoves() { // TODO: 이전 금수 표시 제거 - + ClearForbiddenMarks(); // 흑돌 차례에만 금수 규칙 적용 if (currentTurn == Enums.PlayerType.PlayerA) @@ -137,5 +137,18 @@ public class GameLogic : MonoBehaviour } } + // 이전에 표시된 금수 마크 제거 + private void ClearForbiddenMarks() + { + foreach (var forbiddenMove in _forbiddenMoves) + { + Vector2Int pos = forbiddenMove.position; + if (_board[pos.x, pos.y] == Enums.PlayerType.None) + { + SetStoneNewState(Enums.StoneState.None, pos.x, pos.y); + } + } + } + #endregion }