

A Tetris engine in Go with frame-perfect input handling and guideline-compliant mechanics.
A Tetris engine in Go with frame-perfect input handling and guideline-compliant mechanics.
go build -o termino ./cmd/termino
./termino
termino/
├── cmd/
│ └── termino/
│ └── main.go
├── internal/
│ ├── game/
│ │ ├── engine.go
│ │ ├── logic.go
│ │ ├── randomizer.go
│ │ ├── srs.go
│ │ ├── srs_test.go
│ │ ├── state.go
│ │ └── view.go
│ ├── input/
│ │ └── handler.go
│ ├── render/
│ │ ├── buffer.go
│ │ └── terminal.go
│ └── tetromino/
│ └── pieces.go
├── pkg/
│ └── consts/
│ └── constants.go
├── go.mod
└── README.mdcmd/termino/ — Entry pointinternal/game/ — Game logic, state, and randomizerinternal/render/ — Terminal rendering and bufferinginternal/input/ — Keyboard input handlinginternal/tetromino/ — Piece definitions and rotation systempkg/consts/ — Game constantsRequires Go 1.25.5 or later.
go fmt ./...
go test ./...