Пример #1
0
 private void ResetGame(bool gameState)
 {
     if (gameState)
     {
         //start the opponent in the front yard again
         opponent = new Opponent(frontYard);
         //Initialize the game once again
         InitalizeGame();
         //Display for information about my opponent and how many moves it took me to find him
         IHidingPlace hidingPlace = currentLocation as IHidingPlace;
         description.Text  = "I found my opponent " + hidingPlace.HidingPlaceName + ".";
         description.Text += "It took " + moves + " moves";
         //Diplay a popup message box to the user
         MessageBox.Show("You found me in " + moves + " moves!");
     }
 }