https://github.com/aaronriekenberg/go-tetris
Terminal UI and WebAssembly tetris in go using tcell. Works in everything from xterm to Chrome/Safari.
https://github.com/aaronriekenberg/go-tetris
go tcell terminal tetris-clone tui wasm webassemby
Last synced: 8 months ago
JSON representation
Terminal UI and WebAssembly tetris in go using tcell. Works in everything from xterm to Chrome/Safari.
- Host: GitHub
- URL: https://github.com/aaronriekenberg/go-tetris
- Owner: aaronriekenberg
- License: mit
- Created: 2023-10-08T17:51:52.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-10-25T21:24:30.000Z (8 months ago)
- Last Synced: 2025-10-25T22:26:49.672Z (8 months ago)
- Topics: go, tcell, terminal, tetris-clone, tui, wasm, webassemby
- Language: Go
- Homepage: https://aaronriekenberg.github.io/go-tetris/
- Size: 2.22 MB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-tetris
TUI and WASM tetris in go using [tcell](https://github.com/gdamore/tcell).
Can be used either in a terminal as a native app, or as a [WASM app](https://github.com/gdamore/tcell/blob/main/README-wasm.md) in a web browser.
## Run WASM app in a web browser:
- https://aaronriekenberg.github.io/go-tetris/
- Automatic deploy to github pages on every commit by [github actions](https://github.com/aaronriekenberg/go-tetris/actions)
## Run native terminal app:
- Usual `go` commands work:
```
go run github.com/aaronriekenberg/go-tetris@latest
go install github.com/aaronriekenberg/go-tetris@latest
```
- Clone this git repo, build with `go build`, run `go-tetris`
## Keys:
- Escape, Q: quit (non-WASM only)
- R: restart
- Left Arrow: move piece left
- Right Arrow: move piece right
- Up Arrow: rotate piece
- Down Arrow: move piece down
- Space Bar: drop piece
- V: toggle showing version info
## Finger/Mouse Events:
- Click above board: rotate piece
- Click below board: move piece down
- Double click below board: drop piece
- Click near left of board: move current piece left
- Click near right of board: move current pice right
## Screenshots:
Native app in iTerm2:

WASM in Chrome:
