Exemplo n.º 1
0
 private void timer_Tick(object sender, EventArgs e)
 {
     game.updatTime();
     updatStatusStrip();
     if (game.sec == 30 || (game.sec == 0 && game.min != 0))
     {
         timer.Stop();
         bool temp = game.postaviPrasanje();
         if (temp)
         {
             timer.Start();
         }
         else
         {
             this.Close();
         }
     }
     if (game.gameOver)
     {
         timer.Stop();
         updateScores();
         if (isHighScore)
         {
             MessageBox.Show("Congratulations!!!\nYou've just won a place at Hall of Fame!", "You won!");
             HighScores hs = new HighScores(parent, level);
             this.Close();
             timer.Stop();
             hs.Show();
         }
         else
         {
             MessageBox.Show(String.Format("Time: {0}:{1}\nCorrect Answers: {2}\nWrong Answers: {3}", game.min, game.sec, game.correctAnswers, game.wrongAnswers), "You won!");
             this.Close();
             timer.Stop();
             parent.Show();
         }
     }
 }