public GameMemento Restore() { if (states.Count == 0) { throw new ArgumentNullException(); } GameMemento state = states.Pop(); return(state); }
public void Save(GameMemento state) { states.Push(state); }