The spec says a level should appear as rooms connected by corridors. How do I do that?
The layout of levels is independent of everything else in this project, so you can save it for last if you want to, just having each level be one large room until you're ready to start working on having rooms and corridors. When you are ready to, you could generate a few random nonoverlapping rectangles, pick spots on their edges, and see if looking from there in the direction away from the rectangle hits another rectangle (and if not, maybe does with a right angle turn somewhere, if you want to get fancy). Other approaches are possible: experiment. Your goal is to have it look something like the posted games, with a reasonable number of rooms of reasonable sizes, connected by corridors, but while experimenting, make simplifying assumptions to help you work out ideas: Try having just two rooms, or don't worry initially about the rectangles being nonoverlapping.
What are the various strings the sample program prints?
Here are some:
"swings mace at" "slashes short sword at" "swings long sword at" "strikes magic fangs at" "chops magic axe at" " dealing a final blow." " and hits, putting " " to sleep." " and hits." " and misses." "scroll of teleportation" "You feel your body wrenched in space and time." "scroll of strength" "Your muscles bulge." "scroll of enhance armor" "Your armor glows blue." "scroll of enhance health" "You feel your heart beating stronger." "scroll of enhance dexterity" "You feel like less of a klutz." "the golden idol" "You are wielding " "You can't wield " "You read the scroll called " "You can't read a " "Your knapsack is full; you can't pick that up." "You pick up " "You pick up a scroll called " "Congratulations, you won!"