Chapter 2. Hunt the Wumpus
Listing 2.1. Your first version of Hunt the Wumpus
Listing 2.2. BANG! Your program explodes
Listing 2.3. Adding a friend for the wumpus
Listing 2.4. Setting up your caves
Listing 2.5. Altering your program to use the new cave system
Listing 2.6. Creating a linked cave network
Listing 2.7. Adding convenience functions
Listing 2.8. Cave-creation functions
Listing 2.9. Player-interaction functions
Listing 2.10. The refactored wumpus game
Listing 2.11. Adding arrows
Listing 2.12. An interface for Hunt the Wumpus
Listing 2.13. A list of cave names
Listing 2.14. Hunt the Wumpus—now with 40% more atmosphere!
Chapter 3. Interacting with the world
Listing 3.1. Finding out more about the os.path library
Listing 3.2. Reading parameters using sys
Listing 3.3. Using os.walk()
Listing 3.4. Generating a hash for a file
Listing 3.5. How to use a dictionary
Listing 3.6. Utility functions for your difference program
Listing 3.7. Finding the differences between directories
Listing 3.8. Separating generated results from display
Listing 3.9. Comparing directories, too
Chapter 4. Getting organized
Listing 4.1. Your first unit test
Listing 4.2. One part of the program you can’t test
Listing 4.3. The other part of the program you can’t test
Listing 4.4. Finding command fields
Listing 4.5. Testing run_command
Listing 4.6. Writing run_command
Listing 4.7. Your program so far
Listing 4.8. Testing your to-do list view
Listing 4.9. Displaying to-do items