Python your own Adventure - card & button game
Project description
Introduction
A CircuitPython ‘Choose Your Own Adventure’ framework for PyPortal.
Dependencies
This driver depends on:
Adafruit CircuitPython <https://github.com/adafruit/circuitpython>
Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.
Usage Example
import adafruit_sdcard
import storage
from adafruit_pyoa import PYOA_Graphics
import board
import digitalio
try:
sdcard = adafruit_sdcard.SDCard(board.SPI(), digitalio.DigitalInOut(board.SD_CS))
vfs = storage.VfsFat(sdcard)
storage.mount(vfs, "/sd")
print("SD card found") # no biggie
except OSError:
print("No SD card found") # no biggie
gfx = PYOA_Graphics()
gfx.load_game("/cyoa")
current_card = 0 # start with first card
while True:
print("Current card:", current_card)
current_card = gfx.display_card(current_card)
Documentation
API documentation for this library can be found on Read the Docs.
For information on building library documentation, please check out this guide.
Contributing
Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.
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 adafruit-circuitpython-PYOA-2.5.11.tar.gz
.
File metadata
- Download URL: adafruit-circuitpython-PYOA-2.5.11.tar.gz
- Upload date:
- Size: 7.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b736f2ef7120b7131b19245ebbbc267d9148e11a779bef3c9848e7a1b9cb393 |
|
MD5 | 719dd4dfd5dc4c787ee7656678ba6662 |
|
BLAKE2b-256 | 0307bb4decd2a254124a55932d16d975193fbd4ad97d7709c323cabd9f232ebb |
File details
Details for the file adafruit_circuitpython_PYOA-2.5.11-py3-none-any.whl
.
File metadata
- Download URL: adafruit_circuitpython_PYOA-2.5.11-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 650d4610bcc6dc1004557dcdc1ff011b2a3bc28033ebc6877689425fca2a3a0c |
|
MD5 | 74905a1d72a141a1e6eef6e313f1ebc9 |
|
BLAKE2b-256 | 65e83a42ff19ee38400a87c6be03e771defdab761a504a6ce7ee02f12ac5b15f |