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

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for adafruit-circuitpython-PYOA-2.5.14.tar.gz
Algorithm Hash digest
SHA256 cc62ad26f6218be806523436e921b39cb0251749a2c9a26297e3883a1f21ba12
MD5 553e1872ba7a285ff486d4789b1c96d1
BLAKE2b-256 a2dfc6b6472ee83eb5cae3219ec69b03e06d6bd91cdd72efab92a4841d1e2358

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adafruit_circuitpython_PYOA-2.5.14-py3-none-any.whl
Algorithm Hash digest
SHA256 748b1ac464360abd0a51c139e7bda78f6d0789bfa1cd9191bb53e6ef07ad4ad9
MD5 0f54792452cfc333a163e38f845b1551
BLAKE2b-256 b4314a33699a8edce2d7b30edd7411ca9cb736a237cf7dbd4d91d3e86f9fe683

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