โ† All apps

CandyTetris

๐ŸŽฎ CandyTetris

Tetris on the SugarCraft stack

port of tetrigo game tetris srs deterministic

CandyCore runtime, CandySprinkles for rounded borders + per-piece colours, deterministic 7-bag RNG, ghost piece, hard drop, hold, level-driven gravity ramp, NES-classic line-clear scoring. 41 tests / 1535 assertions.

Install

composer require candycore/candy-tetris

Quickstart

composer install
./bin/tetris

# Controls
# โ† / โ†’   Move left / right
# โ†‘ / x   Rotate clockwise
# z       Rotate counter-cw
# โ†“       Soft drop
# Space   Hard drop
# p       Pause / resume
# q       Quit

What's in the box

SRS rotationStandard Rotation System with simple ยฑ2 wall-kicks. CW / CCW handled identically.
7-bag RNGDeterministic shuffle of the seven pieces; injectable RNG closure for reproducible tests.
Ghost pieceTranslucent preview at the hard-drop landing position.
Hard drop / holdSpace-bar drop; level-driven gravity speed-up at every 10 lines.
NES scoring1 โ†’ 40, 2 โ†’ 100, 3 โ†’ 300, 4 โ†’ 1200 โ€” multiplied by (level + 1).
Six pure-state classesTetromino, Piece, Board, Bag, Score, Game โ€” each individually testable without booting the runtime.

Source & demos

Try the quickstart โ†’

Demos.

VHS-recorded GIFs of every example shipped with the app. Regenerated automatically on every push that touches the source.

Play

Play

Full game with ghost piece, hard drop, level-driven gravity.