tetris

command module
v0.0.0-...-874c920 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2016 License: ISC Imports: 9 Imported by: 0

README

Tetris

A tetris clone modeled mostly after the NES version, but with some updates such as ghost pieces and hard dropping. Does not use the console input driver.

If you do not want a gitlab account but have problems or suggestions, send an email to my gmail address: bendypauldron

Features
  • Less than 500 lines of code.
  • Hard drop
  • Ghost piece
  • Standard Rotation System.
  • Line clear delay, lock delay, fps, soft drop rate, and DAS delay & rate (configurable as consts in source for now).
  • Next piece preview.
  • Hold piece. Hold piece buffering.
  • Classic scoring.
  • NESish tetris ui layout.
Controls

Controls use scancodes. You can find a list of codes in linux/include/uapi/linux/input-event-codes.h and change these in the source.

w - hold, a - left, s - soft drop, d - right, space - hard drop, j - rotate left, k - rotate right

Install (or update)
go get -u gitlab.com/meutraa/tetris
Cross Compiling

See https://golang.org/doc/install/source#environment for GOOS and GOARCH combinations.

git clone git@gitlab.com:meutraa/tetris.git
cd tetris
GOOS=linux GOARCH=arm go build
Usage

User must be a member of the input group.

root $ gpasswd -a "$USER" input
root $ reboot
tetris -i /dev/input/by-id/kbd-your-keyboard-name

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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