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()