pi-tetris
Play Tetris in pi! All 7 tetrominoes, ghost piece, wall kicks, hold piece, score, levels, and session save/restore.
Package details
Install pi-tetris from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-tetris- Package
pi-tetris- Version
1.3.1- Published
- Mar 7, 2026
- Downloads
- 46/mo ยท 14/wk
- Author
- artale
- License
- MIT
- Types
- extension
- Size
- 22.6 KB
- Dependencies
- 0 dependencies ยท 2 peers
Pi manifest JSON
{
"extensions": [
"./extensions"
],
"commands": [
"tetris"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-tetris ๐ฎ
Play Tetris inside pi!

Install
pi install npm:pi-tetris
Or from git:
pi install https://github.com/arosstale/pi-tetris
Play
/tetris
Controls
| Key | Action |
|---|---|
โ โ or A D |
Move left/right |
โ or W |
Rotate |
โ or S |
Soft drop |
SPACE |
Hard drop |
ESC |
Pause & save |
Q |
Quit |
R |
Restart (after game over) |
Features
- All 7 classic tetrominoes (I, O, T, S, Z, J, L) with proper colors
- Ghost piece showing where the piece will land
- Next piece preview
- Wall kicks for rotation near edges
- Score, lines cleared, level tracking
- Speed increases with level
- High score tracking per session
- Game state saves on pause and restores on
/tetris - Soft drop and hard drop with score bonuses
Scoring
| Lines | Points (ร level) |
|---|---|
| 1 | 100 |
| 2 | 300 |
| 3 | 500 |
| 4 (Tetris!) | 800 |
Soft drop: +1 per row. Hard drop: +2 per row.