Skip to main content

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

Usage

Quickstart

  1. Create game instance by:
game = pypuyo.Game()
  1. Go to next frame by:
game.update()
  1. 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)

Uploaded Source

Built Distribution

pypuyo-1.0.4-py3-none-any.whl (5.2 kB view hashes)

Uploaded Python 3

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