Bettys
A terminal-based Tetris clone written in Ruby, rendered with ncurses.
Game Modes
| Mode | Description |
|---|---|
| Marathon (default) | Clear 150 lines to win |
| Sprint | Clear 40 lines as fast as you can |
| Ultra | Survive as long as possible — the clock counts down from 2 minutes |
| Infinite | Play forever with no end condition |
Set the mode with --mode <mode> (e.g. --mode sprint).
Start at a higher level with --level 1-15 or -n <level>.
Key Bindings
Movement uses a vim-style layout (h/j/k/l). Arrow keys also work.
Movement
| Key | Action |
|---|---|
h / ←
|
Move left |
l / →
|
Move right |
j / ↓
|
Soft drop (+1 point per row) |
k |
Rotate clockwise |
K (Shift+K) |
Rotate counter-clockwise |
Advanced
| Key | Action |
|---|---|
J (Shift+J) |
Hard drop — slam piece to the floor and lock instantly (+2 points per row dropped) |
H (Shift+H) |
Dash left — snap piece as far left as possible |
L (Shift+L) |
Dash right — snap piece as far right as possible |
c |
Hold — stash the current piece (once per lock). Swaps with the held piece (or pulls the next piece if hold is empty). Returns piece to default orientation and spawn position |
Game Controls
| Key | Action |
|---|---|
Space |
Pause / Resume |
q |
Quit (press twice if game is running — first press pauses, second quits) |
Lock Delay Mechanics
When a piece lands and is resting on a surface:
- It locks into place after 0.5 seconds of being grounded.
- Moving or rotating the piece while grounded resets the lock timer (up to 15 resets per piece).
Running
gem install bettys
bettysCLI Options
--mode, -m <mode> Game mode: marathon, sprint, ultra, infinite (default: marathon)
--level, -n <n> Starting level 1-15 (default: 1)
--help, -h Show help
Scoring
| Action | Points |
|---|---|
| Soft drop | +1 per row |
| Hard drop | +2 per row |
| Single (1 line) | 100 × level |
| Double (2 lines) | 300 × level |
| Triple (3 lines) | 500 × level |
| Bettys (4 lines) | 800 × level |
Level increases every 10 lines cleared (max 15). Speed increases with each level.
Tests
ruby test/run.rb
