go-tetris

command module
v0.0.0-...-a356467 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2024 License: MIT Imports: 1 Imported by: 0

README

go-tetris

TUI and WASM tetris in go using tcell.

Can be used either in a terminal as a native app, or as a WASM app in a web browser.

Run WASM app in a web browser:

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: go-tetris-native

WASM in Chrome: go-tetris-wasm

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL