Esempio n. 1
0
 private void check_Click(object sender, EventArgs e)
 {
     Moves++;
     if (opponent.Check(currentLocation))
     {
         ResetGame(true);
     }
     else
     {
         RedrawForm();
     }
 }
Esempio n. 2
0
 private void check_Click(object sender, System.EventArgs e)
 {
     _moves++;
     if (_opponent.Check(_currentLocation) && (_currentLocation is IHidingPlace))
     {
         var hidingPlace = (IHidingPlace)_currentLocation;
         MessageBox.Show($@"You found me in {_moves} moves!");
         ResetGame();
     }
     else
     {
         description.Text = @"Not here!";
         Application.DoEvents();
         Thread.Sleep(2000);
         description.Text = _currentLocation.Description;
     }
 }