Exemple #1
0
        public static void Run()
        {
            SongList sl = new SongList();

            sl.IncreasePlayingIndex();
            sl.IncreasePlayingIndex();
            sl.IncreasePlayingLocation();
            CareTaker c = new CareTaker(sl);
            Momento   m = c.CreateMomento();

            sl.IncreasePlayingIndex();
            c.SetMomento(m);
            Console.WriteLine(sl.ReadPlayingIndex());
        }
Exemple #2
0
 public CareTaker(SongList song)
 {
     this.song = song;
 }