public void Undo(IBoard board, IHistoryItem toUndo, IHistoryItem lastMoveBeforeUndo) { var minBoard = board.ToMinified(); var minToUndo = new HistoryItemMinified(); minToUndo.Minify(toUndo, board); HistoryItemMinified minLastMove = null; if (lastMoveBeforeUndo != null) { minLastMove = new HistoryItemMinified(); minLastMove.Minify(lastMoveBeforeUndo, board); } minBoard = ChainOfRules.UndoRule(minBoard, minToUndo, minLastMove); minBoard.ToMaximized(board); }
internal BoardMinified FastForwardUndoMove(BoardMinified board, HistoryItemMinified move, HistoryItemMinified undoMove) { return(FastForwardUndoMoveRules.UndoRule(board, move, undoMove)); }