A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/lordmauve/adventurelib below:

lordmauve/adventurelib: A minimal library for writing text adventure games in Python 3

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.

adventurelib.py is a single file that can be copied into your project. You can also install it with pip:

Comprehensive documentation is on Read The Docs.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4