# rsstacker

A standalone terminal app for playing a block-stacking game and reviewing saved
recordings.

## Features

- **Play** three local modes:
  - **Endless**: open-ended practice with gradually increasing pressure.
  - **Line Race**: clear 40 lines as fast as possible.
  - **Score Attack**: score as much as possible against a two-minute clock.
- **Replay**: load and watch a saved `.ttr` file with play/pause, seek,
  variable speed, and frame stepping.
- **Configurable**: handling, keybindings, and colors live in a TOML file.
- Per-frame input timing, hold, projected landing cells, and live stats.

## Requirements

- Rust toolchain with `rustc` 1.88 or newer.
- On Linux, X11 development libraries for raw keyboard polling in terminals that
  do not expose key release events.

## Build And Run

```sh
cargo run --release
cargo run --release -- replay <file.recording>
```

A standalone binary is produced at `target/release/rsstacker`.

## Controls

| Key | Action |
|-----|--------|
| Left / Right | move left / right |
| Down | soft drop |
| Space | hard drop |
| Z / X or Up | rotate counter-clockwise / clockwise |
| A | rotate 180 degrees |
| C | hold |
| Esc | pause |

In the replay viewer: Space play/pause, Left/Right step, comma/period jump
between locks, minus/plus adjust speed, Home/End seek, question mark help, and q
quit.

## Configuration

On first run a config file is created at your OS config directory:

- Linux: `~/.config/rsstacker/config.toml`
- macOS: `~/Library/Application Support/rsstacker/config.toml`
- Windows: `%APPDATA%\rsstacker\config.toml`

Edit it and restart. The config screen shows the exact path and current values.

## License

[MIT](LICENSE)
