Exemplo n.º 1
0
        public void move(Room room)
        {
            currentRoom = room;

            if (currentRoom.hasPit == true)
                dead = true;
            else if (currentRoom == game.wumpus.currentRoom)
                dead = true;
        }
Exemplo n.º 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);
 }
Exemplo n.º 3
0
        public static Room lookupRoom(int num)
        {
            try
            {
                return roomList[num];
            }
            catch (Exception)
            {
                Room nullRoom = new Room(0);

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