MCPcopy Index your code
hub / github.com/cespare/go-tetris

github.com/cespare/go-tetris @v0.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2.0 ↗ · + Follow
47 symbols 119 edges 8 files 45 documented · 96%

Browse by type

Functions 39 Types & classes 8
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

A simple terminal tetris implementation in Go.

Installation:

go install github.com/cespare/go-tetris@latest

Usage:

go-tetris

Controls

  • Move piece down: , j
  • Move piece left: , h
  • Move piece right: , l
  • Rotate piece: , k
  • Quick drop: space
  • Quit: q, ctrl-c

Implemented features

  • 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

To implement

  • High scores
  • Music + sound effects
  • 'Ghost' piece showing where your piece will land

Core symbols most depended-on inside this repo

Shape

Method 26
Function 13
Struct 4
TypeAlias 4

Languages

Go100%

Modules by API surface

tetris/game.go18 symbols
tetris/board.go12 symbols
tetris/drawing.go7 symbols
tetris/piece.go6 symbols
tetris/vector.go3 symbols
go-tetris.go1 symbols

For agents

$ claude mcp add go-tetris \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page