Exemple #1
0
        private void ResetGame()
        {
            MessageBox.Show("You found me in " + totalMoves + " moves!");
            IHidingPlace foundLocation = currentLocation as IHidingPlace;

            description.Text         = "The opponent was hiding " + currentLocation.Name + " in " + totalMoves.ToString() + " moves. ";
            opponent                 = new Opponent(frontYard);
            hide.Visible             = true;
            check.Visible            = false;
            goHere.Visible           = false;
            exits.Visible            = false;
            goThroughTheDoor.Visible = false;
            totalMoves               = 0;
        }
Exemple #2
0
 private void hide_Click(object sender, EventArgs e)
 {
     opponent = new Opponent(frontYard);
     for (int i = 0; i < 10; i++)
     {
         int theCount = i + 1;
         description.Text += theCount.ToString() + "... ";
         Application.DoEvents();
         System.Threading.Thread.Sleep(200);
         opponent.Move();
     }
     description.Text += "Ready or not, here I come! ";
     Application.DoEvents();
     System.Threading.Thread.Sleep(500);
     RedrawForm();
 }