Beispiel #1
0
        public void move(Room room)
        {
            currentRoom = room;

            if (currentRoom.hasPit == true)
                dead = true;
            else if (currentRoom == game.wumpus.currentRoom)
                dead = true;
        }
Beispiel #2
0
 public Wumpus()
 {
     do
     {
         Random value = new Random();
         int randomNum = value.Next(1, game.width * game.height);
         //Room.lookupRoom(randomNum).hasWumpus = true;
         currentRoom = Room.lookupRoom(randomNum);
     } while (currentRoom.hasPit == true);
 }
Beispiel #3
0
        public static Room lookupRoom(int num)
        {
            try
            {
                return roomList[num];
            }
            catch (Exception)
            {
                Room nullRoom = new Room(0);

                return nullRoom;
            }
        }
Beispiel #4
0
 public void move(Room room)
 {
     clearSmell();
     currentRoom = room;
     setSmell();
 }
Beispiel #5
0
 public Player()
 {
     currentRoom = Room.roomList[0];
     dead = false;
 }