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 hashes)
Built Distribution
pypuyo-1.0.4-py3-none-any.whl
(5.2 kB
view hashes)