wump - play a game of "Hunt the Wumpus"
Move around the tunnels and shoot the wumpus. Don't get eaten by the wumpus, don't fall into a pit, don't hit yourself with an arrow, watch out for bats.
The game gives more instructions. (Embedded documentation! Could this be a precursor to POD?)
Because "Hunt the Wumpus" is one of the classics of early BASIC coding, I decided to stick as closely as possible to the original BASIC code. In this way, this program can serve not only as a fun way to while away the hours while waiting for batch jobs; but it can also be useful to teach the hordes of coders currently moving from 1970's BASIC to Perl.
I was mostly able to get a 1:1 correspondence between lines. You may notice that the Perl code is a bit longer, which I guess proves that BASIC is more powerful and concise. The only places I cheated were to remove goto's (although I was sorely tempted to use a "goto EXPR" for the "ON ... GOTO"s).
Inputs are changed into upper case for your gaming convenience.
"Wumpus" can be found in the Jargon File. Some have gone so far as to say that this was the "first text adventure". In that case, I'm glad text adventures have developed since then.
I have faithfully ported the lack of a "Quit" option. Also the spelling mistakes, and any bugs in the original. For example, you can shoot an arrow to go through rooms "1 2 2", which shouldn't be legal. But faithful porting means faithful porting.
Error message under -w
This program is copyright (C) Amir Karger 1999. (Although I can't imagine why)
This program is free and open software. You may use, copy, modify, distribute and sell this program (and any modified variants) in any way you wish, provided you do not restrict others to do the same.
Apparently, many of them.
Some web sites claim this game was originally written by Gregory Yob, and published in Creative Computing Magazine in the September/October 1975 issue. The OpenBSD man pages say it was "People's Computer Company" in 1973. The BASIC code I used may or may not be the text that appeared in David Ahl's book "101 BASIC Computer Games".
Ported by Amir Karger firstname.lastname@example.org March, 1999
To install PerlPowerTools, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.