New “Choose Your Own Adventure” Game

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.

2 thoughts on “New “Choose Your Own Adventure” Game

  1. 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

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>