Easy text adventures
Project description
adventurelib
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(f'You take the {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 Distribution
Built Distribution
File details
Details for the file adventurelib-1.2.1.tar.gz
.
File metadata
- Download URL: adventurelib-1.2.1.tar.gz
- Upload date:
- Size: 28.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8772d0d9085abf6d6bb0ddea0aa3d8f8228c1cc8a052ff68cd741af27cfdba8e |
|
MD5 | 772fcad37395a1df69d8d435c52e58ff |
|
BLAKE2b-256 | 62463d95f4e84aaf6cf4eee2385f4de8532d9834051f5863300d48632525bf36 |
File details
Details for the file adventurelib-1.2.1-py3-none-any.whl
.
File metadata
- Download URL: adventurelib-1.2.1-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aac1eba3ce841c13c5aa19c94916f6d75ebad9e5ebd5fb50524acd8733b8b432 |
|
MD5 | fe0d64df663384cff15fbe9f2d114f72 |
|
BLAKE2b-256 | 3744f429f6388d365c7bdb00cbbc0838340b0ebe1a31b0708858dd8c55a7d263 |