예제 #1
0
파일: caretaker.cs 프로젝트: Akio532/lab4
        public GameMemento Restore()
        {
            if (states.Count == 0)
            {
                throw new ArgumentNullException();
            }
            GameMemento state = states.Pop();

            return(state);
        }
예제 #2
0
파일: caretaker.cs 프로젝트: Akio532/lab4
 public void Save(GameMemento state)
 {
     states.Push(state);
 }