public void MakeBackup(IMemento memento) { Console.WriteLine("-------------Saving state--------------------"); memento.getGameState().DescribeGame(); Console.WriteLine("---------------------------------------------"); mementos.Add(memento); }
public void RestoreGame(IMemento memento) { gameState = memento.getGameState(); Console.WriteLine("State restored to:"); gameState.DescribeGame(); }