Skip to main content

A python library to allow you to play snake on anything!

Project description

anysnake

anysnake is a super basic snake game that allows you to play it on any device with a Python API and a matrix display. This could be LED's on the front of a network switch, oscilloscope or even plumb it straight into pygame.

Installation

Install via pip:

pip install anysnake

Or install from source:

git clone https://github.com/yourusername/anysnake.git
cd anysnake
pip install -e .

Usage

from anysnake import SnakeGame

def output(matrix):
    """Get matrix data from SnakeGame"""
    print('\n' * 10)
    print(matrix)

snake = SnakeGame(grid=(6, 6), interval=1, start_len=2, callback=output)
snake.start()

Contributing

Contributions are encouraged. Try this and send your crazy snake games to feature in our anysnake project. For any issues please open an issue or submit a pull request on GitHub.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

anysnake-0.1.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file anysnake-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: anysnake-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for anysnake-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7c669b2247cc871449d80c494291f86fe32e9fdb7e5cb68863756b8ee246e051
MD5 c79a0aa8e23c81d6e33fe25de045d9e7
BLAKE2b-256 44bd6dfdb8a8bc02dc3206f35f091157575e3c745cb5f72e0bb4efcdb2904ec2

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