Esempio n. 1
0
		public bool Check(Location location)
		{
			if (location != _currentLocation)
			{
				return false;
			}
			else
			{
				return true;
			}
		}
Esempio n. 2
0
		public void Move()
		{
			bool hidden = false;
			while (!hidden)
			{
				if (_currentLocation is IHaveExteriorDoor)
				{
					if (_random.Next(2) == 1)
					{
						_currentLocation = ((IHaveExteriorDoor)_currentLocation).DoorLocation;
					}


				}
				_currentLocation = _currentLocation.Exits[_random.Next(_currentLocation.Exits.Length)];
				if (_currentLocation is IHidingPlace)
				{
					hidden = true;
				}
			}
		}
Esempio n. 3
0
		public Opponent(Location location)
		{
			_currentLocation = location;
			_random = new Random();
		}
Esempio n. 4
0
		internal void MoveToANewLocation(Location newLocation)
		{
			Moves++;
			_currentLocation = newLocation;
			RedrawForm();
		}