Skip to main content

Python your own Adventure - card & button game

Project description

Introduction

Documentation Status Discord Build Status Code Style: Ruff

A CircuitPython ‘Choose Your Own Adventure’ framework for PyPortal.

Dependencies

This driver depends on:

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adafruit_circuitpython_pyoa-2.6.6.tar.gz (7.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

adafruit_circuitpython_pyoa-2.6.6-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file adafruit_circuitpython_pyoa-2.6.6.tar.gz.

File metadata

File hashes

Hashes for adafruit_circuitpython_pyoa-2.6.6.tar.gz
Algorithm Hash digest
SHA256 0c687b0fe4e37b62b69433c9f0f460317f63d9e13a5d1032b557f627d9c44f0c
MD5 713d57a220b727c91a2f301e3a5de343
BLAKE2b-256 d7a1ce670d99f933818b7bf29ed5b31dca115ccc7411317bb797c063f4317152

See more details on using hashes here.

File details

Details for the file adafruit_circuitpython_pyoa-2.6.6-py3-none-any.whl.

File metadata

File hashes

Hashes for adafruit_circuitpython_pyoa-2.6.6-py3-none-any.whl
Algorithm Hash digest
SHA256 15f71903de82064d69b4e2272e5da7cd2c102d10ee9f22cace308a0f4bba4303
MD5 d8aaf8e6be46fb0f8991b6b9b89fad15
BLAKE2b-256 fd9d23104f91fbe0fe37658a8e11b7a5419d02cca387236975264be34b7b15ee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page