THE GAME
A playing grid consists of the first eight letters of the alphabet (A through H) and an asterisk, arranged in a three by three matrix like this:
D H C
B F *
A E G
For two players there are two of these grids side by side, and in the beginning they are identically scrambled. The method of play is to exchange the letters with the asterisk, one at a time, until the letters are put in their proper order with the asterisk trailing (lower right corner). There is one more rule: in a turn only a letter that is immediately to the left or the right of, or immediately above or below the asterisk may be exchanged.
A move is the entry of just the letter; the program will then exchange the print positions of your choice and the asterisk. (In the example above, valid moves would be F, C, or G. If you are in the dual-player mode, your opponent is permitted to make an entry also before the two new grids are printed. When playing solitaire, there is only one board; so the updated output is nearly instantaneous after each entry.
The program should display different grids each time it is played. There should also be a way for a player to gracefully exit the game if he/she can not solve the puzzle.
THE GAME
The wampus lives in a cave. You are lost in his cave trying to find the only exist so that you can go home. There are twenty chambers in the cave and each has three passageways leading to other chambers. One of the tunnels does go to the cave's mouth, and when you find it you are free.
There are hazards. In one chamber there is a deep pit. If you stumble into there you have had it. In three other chambers there are bats. You are afraid of bats, and when you encounter them, you take the nearest exit automatically. Normally you have time to ponder over which of the three tunnels to take next.
When you wander into the wampus you have another choice. He is afraid of loud noises. You have six firecrackers. If you crawl into the chamber where he is you can make a hasty exit; or if you light the firecracker, he will take off to another chamber. You are safe for the moment. You don't know which tunnel he took, but neither does he know where you will go next. If you ever run out of firecrackers and happen to run into the wampus, he will eat you.
You may give clues to the player, like "YOU CAN FEEL A DRAFT" when one of the tunnels lead to the cave mouth from the chamber you're in or "YOU SMELL A WAMPUS" if one of the tunnels leads to the chamber with the wampus.
The program should place the wampus, pit, bats and exit in different chambers each time it is played. There should also be a way for a player to gracefully exit the game if he/she can not solve the puzzle.