예제 #1
0
        public void Play()
        {
            var adventurer = new Adventurer();

            while (true)
            {
                if (adventurer.Position.IsSavePoint)
                {
                    _snapshots.Add(adventurer.CreateSnapshot());
                }

                // Try adventure

                if (adventurer.Hp <= 0)
                {
                    adventurer.RestoreSnapshot(_snapshots.Last());
                }
            }
        }