Exemple #1
0
 private void buyarrow_Click(object sender, EventArgs e)
 {
     if (player.getGold() > 3)
     {
         if (player.purchaseArrows())
         {
             System.Windows.Forms.MessageBox.Show("Awesome! You got 2 questions right, giving you 2 extra arrows!");
         }
         else
         {
             System.Windows.Forms.MessageBox.Show("Sorry, you didn't correctly answer enough questions. You did not recieve extra arrows.");
         }
         scoreBox.Text = "Total Score: " + player.getScore();
         arrowBox.Text = "Total Arrows: " + player.getArrows();
         goldBox.Text  = "Total Gold: " + player.getGold();
     }
     else
     {
         System.Windows.Forms.MessageBox.Show("Invalid purchase. Please obtain 3 coins or more.");
     }
 }
Exemple #2
0
 private void buyarrow_Click(object sender, EventArgs e)
 {
     if (player.getGold() > 3)
     {
         player.purchaseArrows();
         scoreBox.Text = "Total Score: " + player.getScore();
     }
     else
     {
         status.Text = "Invalid purchase. Please obtain 3 coins or more.";
         Thread.Sleep(3000);
         status.Text = "Game Status:                          ";
     }
 }