A package to make Puyo-Puyo-ish games.
Project description
pypuyo
A pip package to make Puyo-Puyo-ish games.
>>> import pypuyo as ppy
>>> game = ppy.start(width=3, height=3, frames_to_fall=1)
>>> game.update()
>>> game.update()
>>> print(game.get())
[[None, "Yellow", None]
[None, None, None]
[None, None, None]]
>>> game.update()
>>> print(game.get())
[[None, "Yellow", None]
[None, "Blue", None]
[None, None, None]]
Installation
pip
$ python3 -m pip install pupuyo
Cloning repo
$ git clone https://github.com/nnamaco/pypuyo/
Examples
- A GUI example -> https://github.com/nnamaco/pypuyo-example
- A shell CLI example -> https://github.com/nnamaco/pypuyo-example-cli
(Still making)
Usage
Quickstart
- Create game instance by:
game = pypuyo.Game()
- Go to next frame by:
game.update()
- Get array by:
game.get()
Documentation
Methods
| method | desciption | arguments |
|---|---|---|
start |
Returns new game instance. | width: Width of the game.height: Height of the game.types: Array of possible puyos to fall.frames_to_fall: Frames that take puyos to fall. |
move_right |
Move falling puyos right. | - |
move_left |
Move falling puyos right. | - |
spin_right |
Move falling puyos right. | - |
spin_left |
Move falling puyos right. | - |
is_over |
Returns boolean is_gameover. |
- |
update |
Update game to next frame. | - |
get |
Get game as array. | - |
License
This software is released under the MIT License, see LICENSE.
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
pypuyo-1.0.4.tar.gz
(4.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pypuyo-1.0.4.tar.gz.
File metadata
- Download URL: pypuyo-1.0.4.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1580fd81141e48109e81349730017b201c1fe2b105499f3bf8cb1cfc8d8bfff8
|
|
| MD5 |
acc51b75221b196207f8685e88f817e9
|
|
| BLAKE2b-256 |
d75c88b96b3ee8a6fecdabece1ccefe3d414e84895da39ae4d14425e5bf0bddc
|
File details
Details for the file pypuyo-1.0.4-py3-none-any.whl.
File metadata
- Download URL: pypuyo-1.0.4-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbf00dffe2a4c1f3455ae0647faced9765419a697f65d368acee9b94998f26f9
|
|
| MD5 |
1dfe133c5b3cbb1e93e462b89e840644
|
|
| BLAKE2b-256 |
780e36426d9c915682bf07acb1275baee65c4644ed490d448c119f40e07fba69
|