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.7.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.7-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for adafruit_circuitpython_pyoa-2.6.7.tar.gz
Algorithm Hash digest
SHA256 971c3c0d6c5ac4ba42ecb8ca466d7c34d92a6ce5507183eef474e3b02f84fa41
MD5 a8a4cf74e9e98425139306b89569e389
BLAKE2b-256 37990347e0a3442c21b45f18992f9d7ac04ad150e574c9b792a93788aa0d318c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adafruit_circuitpython_pyoa-2.6.7-py3-none-any.whl
Algorithm Hash digest
SHA256 6c6939784dbd82018cdfba8befc0b1f2ade543cbe14f06ed1c7e44d79e9a1084
MD5 c2fcf3000a9378efe277acd444e17478
BLAKE2b-256 b0b881b038bdd904b2cb30a9e89490874fcdefb2d345b542d6fe1bac83000d04

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