Skip to main content

Python your own Adventure - card & button game

Project description

Introduction

Documentation Status Discord Build Status Code Style: Black

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.5.9.tar.gz (7.2 MB view details)

Uploaded Source

Built Distribution

File details

Details for the file adafruit-circuitpython-PYOA-2.5.9.tar.gz.

File metadata

File hashes

Hashes for adafruit-circuitpython-PYOA-2.5.9.tar.gz
Algorithm Hash digest
SHA256 7cdd7e39e64bbdbc79c42ae12e98cc6618a859d78c6e7d353b8f6acd75987893
MD5 c9bba564be8bba6049e169a0e75ceaf3
BLAKE2b-256 f42949ce1f8ea6b45bd79c87725520216656a44bfe6b6fea96e48390747a379c

See more details on using hashes here.

File details

Details for the file adafruit_circuitpython_PYOA-2.5.9-py3-none-any.whl.

File metadata

File hashes

Hashes for adafruit_circuitpython_PYOA-2.5.9-py3-none-any.whl
Algorithm Hash digest
SHA256 220bbd7e1dddafa920ce53108d3742ecd7e464fd68bcd4bf3984c0e8a0d26c7c
MD5 0a3c20a9e63cf13dca34d68096b56d92
BLAKE2b-256 8d0f1e2cb498143103e314ad09dabedd57c4c54295fedcb38636b9e211e743d6

See more details on using hashes here.

Supported by

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