From 29cbe683ac9d54dd2d50b1900f23e6f1c9666080 Mon Sep 17 00:00:00 2001 From: Lim0_C Date: Mon, 17 Mar 2025 14:31:12 +0900 Subject: [PATCH] =?UTF-8?q?DO-33=20[Feat]=20=EB=8F=8C=20=EC=A7=80=EC=9A=B0?= =?UTF-8?q?=EB=8A=94=20=ED=95=A8=EC=88=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RemoveStone추가 --- Assets/Script/Game/GameLogic.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Assets/Script/Game/GameLogic.cs b/Assets/Script/Game/GameLogic.cs index eff00ab..f4a9e0e 100644 --- a/Assets/Script/Game/GameLogic.cs +++ b/Assets/Script/Game/GameLogic.cs @@ -194,7 +194,7 @@ public class GameLogic : MonoBehaviour { if (_board[row, col] != Enums.PlayerType.None) return; - if (stoneController.GetStoneState(row, col) != Enums.StoneState.None) return; + if (stoneController.GetStoneState(row, col) != Enums.StoneState.None && currentTurn == Enums.PlayerType.PlayerA) return; //첫수 및 중복 확인 if ((selectedRow != row || selectedCol != col) && (selectedRow != -1 && selectedCol != -1)) { @@ -226,6 +226,13 @@ public class GameLogic : MonoBehaviour } } + //돌 지우는 함수 + public void RemoveStone(int row, int col) + { + stoneController.SetStoneType(Enums.StoneType.None, row, col); + stoneController.SetStoneState(Enums.StoneState.None, row, col); + } + //마지막 좌표와 선택 좌표 세팅 private void LastNSelectedSetting(int row, int col) {