A simple terminal tetris implementation in Go.
go install github.com/cespare/go-tetris@latest
go-tetris
- Move piece down:
↓,j - Move piece left:
←,h - Move piece right:
→,l - Rotate piece:
↑,k - Quick drop:
space - Quit:
q,ctrl-c
- Random piece generation
- Automatic advancement
- Collision detection
- Anchoring/switching to the next piece
- Quick drop
- Line clearing
- Rotation
- Piece colors
- Print next piece
- Scoring
- Game Over
- Line clearing animations
- Speeding up
- Pausing
- High scores
- Music + sound effects
- 'Ghost' piece showing where your piece will land