Example #1
0
 private void StartGame()
 {
     game.start();
     for (int i = 0; i < 100; i++)
     {
         game.ShiftRandom();
     }
     game.gameCaretaker.states.Clear();
     game.counter = 0;
     game.moves   = 0;
     GameLibrary.GameMemento state = new GameLibrary.GameMemento(game.field, game.x0, game.y0, game.counter);
     game.gameCaretaker.Save(state);
     RefreshButtonField();
 }
Example #2
0
        private void StartGame(object sender, RoutedEventArgs e)
        {
            time  = 0;
            date1 = new DateTime(0, 0);
            CountOfTime.Content = "00:00";
            timer1.Start();
            game.start();
            for (int i = 0; i < 100; i++)
            {
                game.ShiftRandom();
            }
            game.gameCaretaker.states.Clear();
            game.counter = 0;
            game.moves   = 0;
            GameLibrary.GameMemento state = new GameLibrary.GameMemento(game.field, game.x0, game.y0, game.counter);
            game.gameCaretaker.Save(state);

            RefreshButtonField();
        }