Esempio n. 1
0
 private void RedrawForm()
 {
     exits.Items.Clear();
     for (int i = 0; i < currentLocation.Exits.Length; i++)
     {
         exits.Items.Add(currentLocation.Exits[i].Name);
     }
     exits.SelectedIndex = 0;
     description.Text    = currentLocation.Description + "\r\n(move #" + Moves + ")";
     if (currentLocation is IHidingPlaces)
     {
         IHidingPlaces hidingPlace = currentLocation as IHidingPlaces;
         check.Text    = "Check " + hidingPlace.HidingPlaceName;
         check.Visible = true;
     }
     else
     {
         check.Visible = false;
     }
     if (currentLocation is IHasExteriordoor)
     {
         goThroughTheDoor.Visible = true;
     }
     else
     {
         goThroughTheDoor.Visible = false;
     }
 }
Esempio n. 2
0
 private void ResetGame(bool displayMessage)
 {
     if (displayMessage)
     {
         MessageBox.Show("You found me in " + Moves + " moves!");
         IHidingPlaces foundLocation = currentLocation as IHidingPlaces;
         description.Text = "You found your opponent in " + Moves + " moves! He was hiding " + foundLocation.HidingPlaceName + ".";
     }
     Moves                    = 0;
     hide.Visible             = true;
     gohere.Visible           = false;
     check.Visible            = false;
     goThroughTheDoor.Visible = false;
     exits.Visible            = false;
 }