
Hunt the Wumpus

YOUR MISSION

  "Hunt the Wumpus" is one of the most revered classics of text-based
computer gaming. It was invented in 1972 by Gregory Yob; you can read
Yob's own account of the game here.
http://www.atariarchives.org/morebasicgames/showpage.php?page=178

  In this game, you play the role of a hunter, feeling his way through
a mazelike network of unlit caves in search of the Wumpus, a shaggy and
carnivorous beast. Your goal is to find the Wumpus and kill it with
one of the three magical arrows in your quiver. Its goal, naturally,
is to eat you.

  The caves of Hunt the Wumpus are not your average, everyday caves.
The 20 rooms of the maze are laid out on the vertices of a dodecahedron;
or, if you prefer, on the faces of an icosahedron. (If you don't know
what a dodecahedron or an icosahedron is, ask someone.) Each room has
three passageways leading to three other rooms, and it is possible to
approach the Wumpus from one direction, back off, and find yourself
coming at it again from the other direction!

  But your journey is not so simple as all that. To add to the danger
of the Wumpus, two of the rooms have bottomless pits. Fall into a pit,
and you die. Two more rooms are filled with superbats --- powerful
winged creatures that can lift you bodily and transport you a random
distance into a random room of the maze. If that room happens to
contain the Wumpus, or a pit, so much the worse for you!

  You have some warning, however. When you are adjacent to a pit, you
will feel a draft. When you are adjacent to a room with bats, you will
hear the leathery flapping of their wings. And the Wumpus itself has a
stench so powerful that you will smell it from two rooms away!

  When you believe you know which room contains the Wumpus, it's time
to move in for the kill. Shoot one of your arrows into that room. You
can be up to five rooms away and still make the shot, as long as you
correctly specify the rooms through which the arrow must travel to
get to the Wumpus.

  If you accidentally bump the Wumpus, there's a one-in-four chance
it'll gobble you up right then and there. Otherwise, it'll simply
shuffle off down a random passageway. (The Wumpus has sucker feet to
prevent its falling into pits, and it's far too heavy for the superbats
to lift.)

THIS IMPLEMENTATION

  prgmWUMPUS is a port of the oldest "classic" version of the game,
in which the room numbers in the maze are fixed --- you can make a map
of the maze's passages and use it for every game, changing only where
the pits, bats, and Wumpus reside.

  Everything in prgmWUMPUSR is the same as in prgmWUMPUS, except that
the room numbers are randomly shuffled at the beginning of the game,
too. Therefore, while the maze is still isomorphic to a dodecahedron,
you won't be able to use a master map anymore. You'll have to map the
caves anew each time.

  prgmWUMPUSB is my favorite variation. In WUMPUSB, the passages aren't
labeled by their endpoints anymore; instead, in each room you may take
passage A, B, or C. (In other words, the map becomes a random
three-coloring of the edges of the dodecahedron.) You'll need some new
deductive rules in order to map WUMPUSB's cave system.

  Both programs use the user-defined lists LD and LS, the matrix [D],
and the string variable Str1. In addition, prgmWUMPUSR and prgmWUMPUSB
use lists L1 and L2 during their randomizing setup.

  prgmWUMPUS takes 1247 bytes of RAM. prgmWUMPUSR takes 1275 bytes.
prgmWUMPUSB takes 1287 bytes.
