A Python library for easily making text adventure games.
Inspired by textadventure
.
Install the library using pip
or your package manager of choice:
pip install text-adventures
Add this code to import the package:
import text_adventures
To create a Scene
, add this code:
myScene = text_adventures.Scene()
Scene
s take 2 arguments:
title
: astr
that gets printed at the top of the console.actions
: anIterable
ofAction
s that will be ran in order.
Action
s can be set to run in a Scene
. There are currently 4 options:
Text
GoTo
Options
Interaction
But you can expect more soon, or if you don't want to wait, you can make your own! There is a very simple Action
class that you can import to create your own Action
s.