Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pololo300/rstris
a tetris game implmented in rust
https://github.com/pololo300/rstris
Last synced: about 2 months ago
JSON representation
a tetris game implmented in rust
- Host: GitHub
- URL: https://github.com/pololo300/rstris
- Owner: pololo300
- Created: 2024-11-12T22:25:58.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-13T15:54:21.000Z (2 months ago)
- Last Synced: 2024-11-13T16:43:16.980Z (2 months ago)
- Language: Rust
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rstris
My second rust project. A Tetris _game_ where pieces are dominoes. I made it because I couldn't find a version online.
Its build to be extended with other pieces in a future.
## Usage
The default command 'rstris' loads a `20x10` grid. Dimensions can be specified with `-d=x` or with `--dimensions=x`. Also with the parameter `-p=` the game starts with `n` pieces played randomly in the board.
To add arguments with cargo add `--`. For example:
```
cargo run -- -p=20
```## Play
The following keys do something:
- `Space`: fixes the piece if it can be fixed. Otherwise, hard drops the piece.
- `Left Arrow`: left slide.
- `Right Arrow`: right slide.
- `Down Arrow`: drops the piece one row.
- `Up Arrow`: moves up the piece one row.
- `A`: anticlockwise rotation.
- `D`: clockwise rotation.## Installation
Make sure to have `rust` and `cargo` installed. To play the game download the repo, move inside the folder and run `cargo run`.
```
git clone https://github.com/pololo300/rstris.git
cd rstris
cargo run
```