Example #1
0
        public GameMemento Restore()
        {
            if (states.Count == 0)
            {
                throw new ArgumentNullException();
            }
            GameMemento state = states.Pop();

            return(state);
        }
Example #2
0
 public void Save(GameMemento state)
 {
     states.Push(state);
 }