A TUI TETRIS game implemented in Golang with pterm library for terminal rendering.
- Classic TETRIS gameplay with all 7 tetromino shapes
- Colorful terminal-based graphics
- Score tracking and level progression
- Next piece preview
- Make sure you have Go installed (version 1.16 or later)
- Clone or download this repository
- Navigate to the project directory
go build -o tetris cmd/tetris/main.gonix build github:godsarmy/pterm-tetrisThe resulting binary will be available at result/bin/pterm-tetris.
go run cmd/tetris/main.goOr if you built the binary:
./tetris- ← → : Move left/right
- ↑ : Rotate piece
- ↓ : Soft drop (move down faster)
- Space : Hard drop (instantly drop piece)
- + / - : Increase / decrease level
- g : Toggle ghost piece (show/hide drop projection)
- r : Restart from current level (confirm with y/n)
- q : Quit game
This project is licensed under the MIT License - see the LICENSE file for details.
