コード例 #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);
 }