This task has been flagged for clarification. Code on this page in its current state may be flagged incorrect once this task has been clarified. See this page's Talk page for discussion.
Create a simple implementation of the classic textual game Hunt The Wumpus.

The rules are:

The game is set in a cave that consists of a 20 room labyrinth.
Each room is connected to 3 other rooms (the cave is modeled after the
vertices of a dodecahedron).
The objective of the player is to find and kill the horrendous beast Wumpus that lurks in the cave.

The player has 5 arrows.
If they run out of arrows before killing the Wumpus, the player loses the game.

In the cave there are:

 One Wumpus
 Two giant bats
 Two bottomless pits
If the player enters a room with the Wumpus, he is eaten by it and the game is lost.

If the player enters a room with a bottomless pit, he falls into it and the game is lost.

If the player enters a room with a giant bat, the bat takes him and transports him into a random empty room.

Each turn the player can either walk into an adjacent room or shoot into an adjacent room.

Whenever the player enters a room, he "senses" what happens in adjacent rooms.
The messages are:

 Nearby Wumpus: "You smell something terrible nearby."
 Nearby bat: "You hear a rustling."
 Nearby pit: "You feel a cold wind blowing from a nearby cavern."
When the player shoots, he wins the game if he is shooting in the room with the Wumpus.
If he shoots into another room, the Wumpus has a 75% of chance of waking up and moving into an adjacent room: if this is the room with the player, he eats him up and the game is lost.

100 PROGRAM "Wumpus.bas"
110 RANDOMIZE 
120 NUMERIC RO(1 TO 20,1 TO 3),LO(1 TO 20),WPOS
130 LET ARROWS=5:LET L=1
140 CALL INIT
150 DO 
160   PRINT :PRINT "You are in room";L
170   PRINT "Tunnels lead to ";RO(L,1);RO(L,2);RO(L,3)
180   IF MON(1) THEN PRINT "You smell something terrible nearby."
190   IF MON(2) OR MON(3) THEN PRINT "You hear a rustling."
200   IF MON(4) OR MON(5) THEN PRINT "You feel a cold wind blowing from a nearby cavern."
210   PRINT :PRINT "Shoot or move? (S-M)"
220   DO 
230     LET K$=UCASE$(INKEY$)
240   LOOP UNTIL K$="S" OR K$="M"
250   IF K$="M" THEN ! Move
260     INPUT PROMPT "No. of rooms: ":I$
270     LET I=VAL(I$)
280     IF CHK(I) THEN
290       LET L=I
300     ELSE 
310       PRINT "Not possibile."
320     END IF 
330   ELSE  ! Shoot
340     INPUT PROMPT "Where? ":I$
350     LET I=VAL(I$)
360     IF CHK(I) THEN
370       IF LO(I)=1 THEN
380         PRINT "You kill the Monster Wumpus.":PRINT "You win.":EXIT DO
390       ELSE 
400         PRINT "Arrows aren't that crooked - Try another room."
410         IF RND(4)<3 THEN
420           PRINT "You woke the Wumpus and he moved."
430           LET LO(WPOS)=0:LET WPOS=RO(WPOS,RND(2)+1):LET LO(WPOS)=1
440         END IF 
450         LET ARROWS=ARROWS-1
460         IF ARROWS=0 THEN PRINT "You ran out of arrows.":EXIT DO
470       END IF 
480     ELSE 
490       PRINT "Not possibile."
500     END IF 
510   END IF 
520   SELECT CASE LO(L)
530   CASE 1
540     PRINT "You eaten by Wumpus.":EXIT DO
550   CASE 2,3
560     PRINT "A giant bat takes you in another room.":LET I=L
570     DO 
580       LET L=RND(19)+1
590     LOOP UNTIL I<>L
600   CASE ELSE
610   END SELECT 
620   IF LO(L)=4 OR LO(L)=5 THEN PRINT "You fall into a bottomless pit.":EXIT DO
630 LOOP 
640 DEF MON(X)=X=LO(RO(L,1)) OR X=LO(RO(L,2)) OR X=LO(RO(L,3))
650 DEF CHK(X)=X=RO(L,1) OR X=RO(L,2) OR X=RO(L,3)
660 DEF INIT
670   TEXT 40:PRINT "Hunt the Wumpus";CHR$(241)
680   FOR I=1 TO 20 ! Create the cave
690     LET LO(I)=0
700     FOR J=1 TO 3
710       READ RO(I,J)
720     NEXT 
730   NEXT 
740   LET WPOS=RND(19)+2:LET LO(WPOS)=1
750   FOR I=2 TO 5
760     DO 
770       LET T=RND(19)+2
780     LOOP UNTIL LO(T)=0
790     LET LO(T)=I
800   NEXT 
810 END DEF 
820 DATA 2,6,5,3,8,1,4,10,2,5,2,3,1,14,4,15,1,7,17,6,8,7,2,9,18,8,10,9,3,11
830 DATA 19,10,12,11,4,13,20,12,14,5,11,13,6,16,14,20,15,17,16,7,18,17,9,19,18,11,20,19,13,16