DO-82 [Fix] 리플레이 마지막 돌 상태 버그 수정

This commit is contained in:
Lim0_C 2025-03-28 14:12:23 +09:00
parent 6238c826a4
commit 0ec7afc602
2 changed files with 16 additions and 0 deletions

View File

@ -86,4 +86,10 @@
ReplayManager.Instance.SaveReplayDataResult(result);
//TODO: 게임 종료 후 행동 구현
}
public void SetLastPositioned(int row, int col)
{
_lastRow = row;
_lastCol = col;
}
}

View File

@ -215,6 +215,16 @@ public class ReplayManager : Singleton<ReplayManager>
{
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()