Q: Specifically, what do I need to do to run this program inside Emacs?
A: Copy each new code fragment into the Emacs scratch buffer (accessible via the command C-x b *scratch*) and move the cursor to the end of each expression and type the command C-x C-e to evaluate it.
Emacs console screenshot
To make a move in the game, you can just do exactly the same thing - The program will answer your move by displaying text in the echo area in the bottom of the Emacs window. If you did something wrong and Emacs starts showing error messages, you'll want to use the command M-x top-level... That usually clears out the errors.
If you want it to feel more like an adventure game... Another way to play the game with a real game prompt is to run the M-x ielm command. This will bring you to an Elisp language prompt- Then you can just enter the commands and see the response directly, just like a real text adventure game!
One more thing: Sometimes Emacs will truncate messages in the echo area - run the following command in the *scratch* buffer to prevent this:
  (setq eval-expression-print-length nil)
One more one more thing: This tutorial uses some commands from the Common Lisp libraries, which may require you to run this extra command, depending on your version of elisp- You might want to run it, just for sure:
  (require 'cl)
<< begin < previous - next > end >>