コード例 #1
0
ファイル: Game.cs プロジェクト: rishikavikondala/wumpus2018
 private void buysecret_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 a secret piece of intelligence!");
             System.Windows.Forms.MessageBox.Show(map.getSecret());
         }
         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();
         goldBox.Text  = "Total Gold: " + player.getGold();
     }
     else
     {
         System.Windows.Forms.MessageBox.Show("Invalid purchase. Please obtain 3 coins or more.");
     }
 }