LinuxCommandLibrary

tetris-bsd

TLDR

Start a game of tetris

$ tetris-bsd
copy
Start at a specific level
$ tetris-bsd -l [level]
copy
Enable preview of the next shape
$ tetris-bsd -p
copy
Use custom control keys (left, rotate, right, drop, pause, quit)
$ tetris-bsd -k "[jkl pq]"
copy
Start with seed for reproducible game
$ tetris-bsd -s [seed]
copy

SYNOPSIS

tetris-bsd [-ps] [-k keys] [-l level] [-s seed]

DESCRIPTION

tetris-bsd is a terminal-based Tetris implementation from the BSD games collection. The game displays falling tetrominoes that must be arranged to form complete horizontal rows. Completed rows disappear, and the game ends when blocks stack to the top.
Default controls use vi-style keys: j (left), k (rotate), l (right), space (drop), p (pause), q (quit). The falling speed is directly proportional to the level number.
Scoring awards one point per block placed and one point per space dropped. The final score is multiplied by the current level. High scores are saved in /var/games/bsdgames/tetris-bsd.scores.

PARAMETERS

-l level

Set the starting level (2-9). Higher levels make blocks fall faster.
-k keys
Customize control keys. Provide six characters for: left, rotate, right, drop, pause, quit.
-p
Enable preview of the next shape that will appear.
-s seed
Set the random seed for reproducible block sequences.

CAVEATS

The game must be played on a CRT-compatible terminal. The vi-style default controls may be unfamiliar to users expecting arrow keys. The speed increases as the game progresses regardless of initial level selection.

HISTORY

The original Tetris was created by Alexey Pajitnov in 1984 in the Soviet Union. This BSD implementation was adapted from a 1989 International Obfuscated C Code Contest winner by Chris Torek and Darren F. Provine. Preview mode was added by Hubert Feyrer in 1999. The game is part of the bsdgames package included in many Unix-like distributions.

SEE ALSO

tetris(6), bcd(6), snake(6), worm(6)

Copied to clipboard