.TH xtetris "" "" "X Client"
.PC "Wildly amusing implementation of Tetris"
\fBxtetris [ \fItoolkitoption ... \^\fB]\fR
.PP
.HS
.SH Options:
.IC "\fB\-bd \fIcolor\fR"
Set the color of the border to
.I color
.IC "\fB\-bg \fIcolor\fR"
Set the color of the background to
.I color
.IC "\fB\-boxsize \fIboxsize\fR"
Set the width of the square blocks that comprise the falling objects
.IC \fB\-bw\fR
Use black-and-white defaults file
.IC "\fB\-fg \fIcolor\fR"
Set the color of the foreground to
.I color
.IC "\fB\-fn \fIfont\fR"
Use
.I font
.IC "\fB\-geometry \fIgeometry\fR"
Set the geometry of the program's window to
.I geometry
.IC \fB\-noscore\fR
Do not record your score or show you the score file when you
have finished the game
.IC \fB\-rv\fR
Simulate reverse video by exchanging the foreground and background colors
.IC \fB\-score\fR
Runs
.B xtetris
using the scorefile, if it exists
.IC "\fB\-speed \fIspeed\fR"
Sets the game's speed to
.I speed
.IC "\fB\-xrm \fIresourcestring\fR"
Use
.I resourcestring
to define a resource.
.HE
.B xtetris
is an X Windows implementation of the popular game Tetris.
This game drops a series of blocks from the top of a column.
Each block is randomly selected from the set of six possible shapes.
The point of the game is to maneuver the blocks as they fall,
and so build a solid mass at the bottom of the column.
.PP
As a block drops, you can move it to the left or to the right
by clicking the left or right mouse buttons, respectively.
Pressing the shift key while clicking the left mouse button rotates
the falling shape counter-clockwise;
pressing the shift key while clicking the right mouse button rotates
it clockwise.
Pressing the middle mouse button drops the shape quickly.
.PP
You can also use the keyboard:
.IP \fBh\fR 0.3i
Move the block to the left.
.IP \fBl\fR
Move the block to the right.
.IP \fBj\fR
Rotate clockwise.
.IP \fBk\fR
Rotate counter-clockwise.
.IP \fB<space>\fR
Drop quickly.
.PP
You can also use arrow keys, as follows:
.IP \*(LA
Move left.
.IP \*(RA
Move right.
.IP \*(DA
Rotate clockwise.
.IP \*(UA
Rotate counter-clockwise.
.PP
You score points for each block that comes to rest on the gradually
accumulating pile of blocks.
Different blocks in different orientations have different point values.
If you complete a row of blocks across the column,
that row is removed and the entire pile drops
by the width of the row, thus buying you more time to play.
The longer you play, the faster the blocks fall.
The game ends
when the pile reaches the top of the screen and no more blocks can fall.
.PP
.B xtetris
keeps a table of high scores.
You can avoid recording your score by using the option
.BR \-noscore .
.PP
.B xtetris
requires the defaults file
.BR /usr/X11/lib/app-defaults/Xtetris .
You can configure almost everything about
.B xtetris
in its defaults file.
.B xtetris
comes with two sample defaults files:
.B Xtetris.c
and
.BR Xtetris.bw .
As their names imply, the former is for color systems, and the latter is
for monochrome.
Some objects are unsightly, or disappear entirely, if you run
.B xtetris
with the wrong defaults file; therefore,
you should link
.B Xtetris
to the appropriate file.
.SH Options
.B xtetris
recognizes the following command-line options:
.IP "\fB\-bd \fIcolor\fR" 0.75i
Set the color of the border to
.IR color .
.IP "\fB\-bg \fIcolor\fR"
Set the color of the background to
.IR color .
.IP "\fB\-boxsize \fIboxsize\fR"
Set the width of the square blocks that comprise the falling objects.
The overall size of the game board adjusts to
.IR boxsize .
.IP \fB\-bw\fR
Use black-and-white defaults file.
.IP "\fB\-fg \fIcolor\fR"
Set the color of the foreground to
.IR color .
.IP "\fB\-fn \fIfont\fR"
Use
.I font
in the display.
.IP "\fB\-geometry \fIgeometry\fR"
Set the geometry of the program's window to
.IR geometry .
The term ``geometry'' means the dimensions of the window and its location
on the screen.
.I geometry
has the form \fIwidth\(muheight\(+-xoffset\(+-yoffset\fR.
.IP \fB\-noscore\fR
Do not record your score or show you the score file when you
have finished the game.
.IP \fB\-rv\fR
Simulate reverse video by exchanging the foreground and background colors.
.IP \fB\-score\fR
Runs
.B xtetris
using the scorefile, if it exists.
.IP "\fB\-speed \fIspeed\fR"
Sets the game's speed.
By default,
.I speed
is ten.
A
.I speed
of 20 doubles game speed;
a
.I speed
of five makes it half as fast.
.B "\-speed 50"
makes for an extremely fast game; however, you will need a fast processor
to support it.
Keep in mind that as you knock out rows, the game's speed increases.
If you set your speed below the standard of ten, your
score will not be recorded in the score file.
.IP "\fB\-xrm \fIresourcestring\fR"
Use
.I resourcestring
to define a resource.
.SH Files
\fB/usr/lib/X11/app-defaults/Xtetris\fR \(em Default defaults file
.br
\fB/usr/lib/X11/app-defaults/Xtetris.c\fR \(em Color defaults file
.br
\fB/usr/lib/X11/app-defaults/Xtetris.bw\fR \(em Monochrome defaults file
.br
\fB/usr/lib/X11/lib/tetris_scores\fR \(em Top ten high scores
.SH "Environmental Variables"
.B xtetris
reads the environmental variable
.BR XTETRIS ,
which gives the name of the scores file.
.SH "See Also"
.B
puzzle,
xgas,
X clients
.R
.SH "Notes"
A bug in X11R5 makes the file
.B /usr/lib/X11/app-defaults/Xtetris
necessary:
the pop-up score-box and the information box
do not receive a resource in the X server's resource data base.
.PP
.II "Greening, Daniel R."
.II "Tallot, Didier"
.II "Everson, Phill"
.II "Shortley, Martyn"
.II "Marguilies, Adam"
Copyright \(co 1991, Daniel R. Greening,
Didier Tallot, Phill Everson,
and Martyn Shortley.
.B xtetris
was written by
Dan Greening, Didier Tallot, Phill Everson, Martyn Shortley,
and Adam Marguilies.
