How brecht6/tetris-tui works
Tetris-TUI is a terminal-playable Tetris game. The user launches it and controls pieces; the Bubble Tea model handles input and timed ticks, applies game rules, and renders the board and score. Game state and piece data are defined separately from piece movement, collision, locking, and line clearing. The excerpts show these calls directly; framework-driven dispatch is not represented as a verified edge.
Main entry points: main.go Game Loop · blocks.go Collision Checks · types.go Game State
Components 7
Terminal Interaction
- Game Loop
main.go - Board Display
main.go
Game State
- Game State
types.go
Piece Rules
- Piece Motion
blocks.go - Collision Checks
blocks.go - Lock and Clear
blocks.go
Other components
- Player
Connections 8
- Player → Game Loop: launches and controls
README.md - Game Loop → Game State: initializes and updates
main.go - Game Loop → Piece Motion: moves and rotates
main.go - Game Loop → Collision Checks: checks landing and game over
main.go - Game Loop → Lock and Clear: locks pieces and scores
main.go - Board Display → Lock and Clear: composes current piece
main.go - Piece Motion → Collision Checks: checks legal positions
blocks.go - Collision Checks → Lock and Clear: reads occupied cells
blocks.go