Example #1
0
 public bool Check(Location location)
 {
     if (this.myLocation == location)
         return true;
     else
         return false;
 }
Example #2
0
        public void Move()
        {
            if (myLocation is IHasExteriorDoor)
            {
                IHasExteriorDoor LocationWithDoor = myLocation as IHasExteriorDoor;
                if (random.Next(2)==1)
                {
                    myLocation = LocationWithDoor.DoorLocation;
                }
            }

            bool hiden = false;
            while (!hiden)
            {
                int rand = random.Next(myLocation.Exits.Length);
                myLocation = myLocation.Exits[rand];
                if (myLocation is IHidingPlace)
                    hiden = true;
            }
        }
Example #3
0
 public Opponent(Location startLocation)
 {
     this.myLocation = startLocation;
     random = new Random();
 }