Merge pull request #81 from Degulleo/DO-82-리플레이-이전했을-경우-마지막-돌-표시-버그
DO-82 [Fix] 리플레이 마지막 돌 상태 버그 수정
This commit is contained in:
commit
297fe48f6a
@ -86,4 +86,10 @@
|
||||
ReplayManager.Instance.SaveReplayDataResult(result);
|
||||
//TODO: 게임 종료 후 행동 구현
|
||||
}
|
||||
|
||||
public void SetLastPositioned(int row, int col)
|
||||
{
|
||||
_lastRow = row;
|
||||
_lastCol = col;
|
||||
}
|
||||
}
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user