예제 #1
0
 private void startGame_Click(object sender, EventArgs e)
 {
     if (game != null)
     {
         if (game.isFinished == true)
         {
             _interceptor.StopCapturing();
             _interceptor.StartCapturing();
             highestLevelLabel.Text = "Your highest level is: " + game.currentLevel.ToString();
             game.destroy();
             game = new Game(selectedColor);
             game.start();
         }
         else
         {
             highestLevelLabel.Text = "Your highest level is: " + game.currentLevel.ToString();
             game.destroy();
             _interceptor.StopCapturing();
             _interceptor.StartCapturing();
             game.start();
         }
     } else
     {
         _interceptor.StopCapturing();
         _interceptor.StartCapturing();
         game = new Game(selectedColor);
         game.start();
     }
 }
예제 #2
0
 private void restartGame_Click(object sender, EventArgs e)
 {
     highestLevelLabel.Text = "Your highest level is: " + game.currentLevel.ToString();
     game.destroy();
     _interceptor.StopCapturing();
     _interceptor.StartCapturing();
     game = new Game(selectedColor);
     game.start();
 }
예제 #3
0
 private void showFailButton_Click(object sender, EventArgs e)
 {
     game = new Game(Corale.Colore.Core.Color.Pink);
     game.showFailure();
 }