Having a “Choose Your Own Adventure” style game for readers to look at was suggested to me, so I quickly wrote one up. The code is designed to be very simple, despite its length. There is no accompanying chapter, but I do provide a short description page.
The source code:
http://inventwithpython.com/extra/dragon2.py
The description page:
http://inventwithpython.com/extra/dragon2.html
These links are also on the Extras page on the main site.

how hard would it be to integrate images into this? I was thinking like a background image per each option?
also I got this error:
teamcoltra@paradoxicon ~/Downloads $ python ‘/home/teamcoltra/Downloads/dragon2.py’
File “/home/teamcoltra/Downloads/dragon2.py”, line 6
print(’1 to ‘ + str(numberOfPaths) + ‘> ‘, end=”)
^
SyntaxError: invalid syntax
Posted by Travis McCrea on February 10th, 2010.
Thanks for the comment, Travis. I have since fixed that bug in the dragon2.py file that you mentioned. Thanks again!
Posted by Al Sweigart on April 8th, 2010.