Easy text adventures
Project description
adventurelib provides basic functionality for writing text-based adventure games, with the aim of making it easy enough for young teenagers to do.
The foundation of adventurelib is the ability to define functions that are called in response to commands. For example, you could write a function to be called when the user types commands like “take hat”:
@when('take THING') def take(thing): print('You take the %s.' % thing) inventory.append(thing)
It also includes the foundations needed to write games involving rooms, items, characters and more… but users will have to implement these features for themselves as they explore Python programming concepts.
Installing
adventurelib.py is a single file that can be copied into your project. You can also install it with pip:
pip install adventurelib
Documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file adventurelib-1.0.zip
.
File metadata
- Download URL: adventurelib-1.0.zip
- Upload date:
- Size: 25.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14f2d912676c52f5bb61d4795560a8829963d6656e22c8aed6f9a7e4e71a1609 |
|
MD5 | 421815329d6827331753ff03a56ada8d |
|
BLAKE2b-256 | e803b0b013c1e52f227c01b3bb03fbb93e1706983b7a122111d7c8ec75db3045 |
File details
Details for the file adventurelib-1.0.tar.gz
.
File metadata
- Download URL: adventurelib-1.0.tar.gz
- Upload date:
- Size: 20.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f09f6f21eb0006754fa29ca098d7145ac182b6a8efb1c5b42adb70e4c15789c |
|
MD5 | 0d7950a148a2810f24f92bda293194f0 |
|
BLAKE2b-256 | 35aba4df1c2002d450bac0c408505b306eb0576602fdedc64d4d24da496a5bd2 |
File details
Details for the file adventurelib-1.0-py3-none-any.whl
.
File metadata
- Download URL: adventurelib-1.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74e728ce6eee875500749ac75c88e7b6fab9b3a508adea4a1248225e7959dc51 |
|
MD5 | 451aac865c45513206f9e02e13c54564 |
|
BLAKE2b-256 | 82dfe16f2db7abb5355c1fdf179696d1b6c6691e4a95bc233089d944b4cffca7 |