From 0ec7afc6024f8be549e087db13894ef1ebf3f796 Mon Sep 17 00:00:00 2001 From: Lim0_C Date: Fri, 28 Mar 2025 14:12:23 +0900 Subject: [PATCH] =?UTF-8?q?DO-82=20[Fix]=20=EB=A6=AC=ED=94=8C=EB=A0=88?= =?UTF-8?q?=EC=9D=B4=20=EB=A7=88=EC=A7=80=EB=A7=89=20=EB=8F=8C=20=EC=83=81?= =?UTF-8?q?=ED=83=9C=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Script/Game/GameUtility/GameRoutine.cs | 6 ++++++ Assets/Script/Replay/ReplayManager.cs | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/Assets/Script/Game/GameUtility/GameRoutine.cs b/Assets/Script/Game/GameUtility/GameRoutine.cs index 18c131f..b3148c3 100644 --- a/Assets/Script/Game/GameUtility/GameRoutine.cs +++ b/Assets/Script/Game/GameUtility/GameRoutine.cs @@ -86,4 +86,10 @@ ReplayManager.Instance.SaveReplayDataResult(result); //TODO: 게임 종료 후 행동 구현 } + + public void SetLastPositioned(int row, int col) + { + _lastRow = row; + _lastCol = col; + } } \ No newline at end of file diff --git a/Assets/Script/Replay/ReplayManager.cs b/Assets/Script/Replay/ReplayManager.cs index 8b5bbc7..d716375 100644 --- a/Assets/Script/Replay/ReplayManager.cs +++ b/Assets/Script/Replay/ReplayManager.cs @@ -215,6 +215,16 @@ public class ReplayManager : Singleton { ReplayManager.Instance.PushUndoMove(targetMove); _gameLogic.RemoveStone(targetMove.columnIndex, targetMove.rowIndex); + if (_placedStoneStack.Count > 0) + { + var undoLastMove = _placedStoneStack.Peek(); + _gameLogic.StoneController.SetStoneState(Enums.StoneState.LastPositioned, undoLastMove.columnIndex, undoLastMove.rowIndex); + _gameLogic.SetLastPositioned(undoLastMove.columnIndex, undoLastMove.rowIndex); + } + else + { + _gameLogic.SetLastPositioned(-1, -1); + } } public void ReplayFirst()