示例#1
0
		public bool Check(Location location)
		{
			if (location != _currentLocation)
			{
				return false;
			}
			else
			{
				return true;
			}
		}
示例#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;
				}
			}
		}
示例#3
0
		public Opponent(Location location)
		{
			_currentLocation = location;
			_random = new Random();
		}
示例#4
0
		internal void MoveToANewLocation(Location newLocation)
		{
			Moves++;
			_currentLocation = newLocation;
			RedrawForm();
		}