https://github.com/weisrc/polyomino-engine
Simple game engine for generic polyomino line clearing puzzle games.
https://github.com/weisrc/polyomino-engine
Last synced: about 1 month ago
JSON representation
Simple game engine for generic polyomino line clearing puzzle games.
- Host: GitHub
- URL: https://github.com/weisrc/polyomino-engine
- Owner: weisrc
- Created: 2022-01-24T18:52:51.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-28T02:01:56.000Z (over 3 years ago)
- Last Synced: 2025-02-15T19:24:47.981Z (3 months ago)
- Language: TypeScript
- Size: 73.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Polyomino Engine
A very simple game engine for generic polyomino line clearning puzzle games.
## Installation
```ts
import * as poly from "polyomino-engine";
```## Usage
- create: create a new a game instance
- drop: hard drop the cursor piece
- floating: detect if the cursor piece is floating or not
- move: moves the cursor piece, returns false if operation fails
- predict: predict the y of the cursor piece if it was dropped
- print: print the cursor piece onto the board
- rotate: rotate the cursor piece, returns false if operation fails
- spawn: spawns a piece using the available spawn locations, returns false if operation fails
- verify: verifies if the current board and cursor are valid
- clear: clears the filled lines and returns an array of line numbers> Please refer to `src/types` for more information on the internal types or use intellisense.