Beispiel #1
0
 private void shoot_Click(object sender, EventArgs e)
 {
     if (player.getArrows() > 0 && map.validRoom(controlInput))
     {
         if (player.shootArrow(controlInput))
         {
             turn.Text         = "Total Turns: " + player.getTurns();
             this.latestPlayer = player;
             highscores.mutate(player);
             win();
         }
         turn.Text     = "Total Turns: " + player.getTurns();
         arrowBox.Text = "Total Arrows: " + player.getArrows();
         scoreBox.Text = "Total Score: " + player.getScore();
         map.moveBat();
         map.moveWumpus();
         if (player.getArrows() == 0)
         {
             System.Windows.Forms.MessageBox.Show("You have zero arrows! You lose.");
             this.Hide();
             (new Lose()).Show();
         }
         else
         {
             System.Windows.Forms.MessageBox.Show("MISS");
         }
     }
 }
Beispiel #2
0
 private void shoot_Click(object sender, EventArgs e)
 {
     if (player.getArrows() > 0)
     {
         if (player.shootArrow(controlInput))
         {
             this.latestPlayer = player;
             highscores.mutate(player);
             win();
         }
         arrowBox.Text = "Total Arrows: " + player.getArrows();
         scoreBox.Text = "Total Score: " + player.getScore();
     }
 }