2005-09-15 06:09:41 +04:00
|
|
|
.\" $NetBSD: tetris.6,v 1.11 2005/09/15 02:09:42 wiz Exp $
|
1995-04-22 11:42:31 +04:00
|
|
|
.\"
|
1994-05-06 10:50:50 +04:00
|
|
|
.\" Copyright (c) 1992, 1993
|
|
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" This code is derived from software contributed to Berkeley by
|
|
|
|
.\" Nancy L. Tinkham and Darren F. Provine.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
2003-08-07 13:36:50 +04:00
|
|
|
.\" 3. Neither the name of the University nor the names of its contributors
|
1994-05-06 10:50:50 +04:00
|
|
|
.\" may be used to endorse or promote products derived from this software
|
|
|
|
.\" without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\" @(#)tetris.6 8.1 (Berkeley) 5/31/93
|
|
|
|
.\"
|
1997-05-29 05:48:05 +04:00
|
|
|
.Dd May 31, 1993
|
1994-05-06 10:50:50 +04:00
|
|
|
.Dt TETRIS 6
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm tetris
|
|
|
|
.Nd the game of tetris
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
1999-01-03 20:13:51 +03:00
|
|
|
.Op Fl ps
|
1994-05-06 10:50:50 +04:00
|
|
|
.Op Fl k Ar keys
|
|
|
|
.Op Fl l Ar level
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
command runs display-based game which must be played on a CRT terminal.
|
|
|
|
The object is to fit the shapes together forming complete rows,
|
|
|
|
which then vanish.
|
|
|
|
When the shapes fill up to the top, the game ends.
|
|
|
|
You can optionally select a level of play, or custom-select control keys.
|
|
|
|
.Pp
|
|
|
|
The default level of play is 2.
|
|
|
|
.Pp
|
|
|
|
The default control keys are as follows:
|
|
|
|
.Pp
|
2002-09-26 22:31:58 +04:00
|
|
|
.Bl -tag -width "xxspacexx" -compact -offset indent
|
1994-05-06 10:50:50 +04:00
|
|
|
.It j
|
|
|
|
move left
|
|
|
|
.It k
|
|
|
|
rotate 1/4 turn counterclockwise
|
|
|
|
.It l
|
|
|
|
move right
|
2002-09-26 22:31:58 +04:00
|
|
|
.It Aq space
|
1994-05-06 10:50:50 +04:00
|
|
|
drop
|
|
|
|
.It p
|
|
|
|
pause
|
|
|
|
.It q
|
|
|
|
quit
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
The options are as follows:
|
|
|
|
.Bl -tag -width indent
|
|
|
|
.It Fl k
|
|
|
|
The default control keys can be changed using the
|
1997-09-02 03:26:11 +04:00
|
|
|
.Fl k
|
|
|
|
option.
|
1994-05-06 10:50:50 +04:00
|
|
|
The
|
|
|
|
.Ar keys
|
|
|
|
argument must have the six keys in order, and, remember to quote any
|
|
|
|
space or tab characters from the shell.
|
|
|
|
For example:
|
|
|
|
.sp
|
|
|
|
.Dl "tetris -l 2 -k 'jkl pq'"
|
|
|
|
.sp
|
|
|
|
will play the default games, i.e. level 2 and with the default
|
|
|
|
control keys.
|
|
|
|
The current key settings are displayed at the bottom of the screen
|
|
|
|
during play.
|
|
|
|
.It Fl l
|
|
|
|
Select a level of play.
|
|
|
|
.It Fl s
|
|
|
|
Display the top scores.
|
1999-01-03 20:13:51 +03:00
|
|
|
.It Fl p
|
2001-04-03 02:42:37 +04:00
|
|
|
Switch on previewing of the shape that will appear next.
|
1994-05-06 10:50:50 +04:00
|
|
|
.El
|
|
|
|
.Sh PLAY
|
|
|
|
At the start of the game, a shape will appear at the top of the screen,
|
|
|
|
falling one square at a time.
|
|
|
|
The speed at which it falls is determined directly by the level:
|
|
|
|
if you select level 2, the blocks will fall twice per second;
|
|
|
|
at level 9, they fall 9 times per second.
|
|
|
|
(As the game goes on, things speed up,
|
|
|
|
no matter what your initial selection.)
|
|
|
|
When this shape
|
2002-09-26 22:31:58 +04:00
|
|
|
.Dq touches down
|
1994-05-06 10:50:50 +04:00
|
|
|
on the bottom of the field, another will appear at the top.
|
|
|
|
.Pp
|
|
|
|
You can move shapes to the left or right, rotate them counterclockwise,
|
|
|
|
or drop them to the bottom by pressing the appropriate keys.
|
|
|
|
As you fit them together, completed horizontal rows vanish,
|
|
|
|
and any blocks above fall down to fill in.
|
|
|
|
When the blocks stack up to the top of the screen, the game is over.
|
|
|
|
.Sh SCORING
|
|
|
|
You get one point for every block you fit into the stack,
|
|
|
|
and one point for every space a block falls when you hit the drop key.
|
|
|
|
(Dropping the blocks is therefore a good way to increase your score.)
|
|
|
|
Your total score is the product of the level of play
|
|
|
|
and your accumulated
|
|
|
|
.ie t points\(em200
|
|
|
|
.el points -- 200
|
|
|
|
points on level 3 gives you a score of 600.
|
|
|
|
Each player gets at most one entry on any level,
|
|
|
|
for a total of nine scores in the high scores file.
|
|
|
|
Players who no longer have accounts are limited to one score.
|
|
|
|
Also, scores over 5 years old are expired.
|
|
|
|
The exception to these conditions is that the highest score on a given
|
|
|
|
level is
|
|
|
|
.Em always
|
|
|
|
kept,
|
|
|
|
so that following generations can pay homage to those who have
|
|
|
|
wasted serious amounts of time.
|
|
|
|
.Pp
|
|
|
|
The score list is produced at the end of the game.
|
|
|
|
The printout includes each player's overall ranking,
|
|
|
|
name, score, and how many points were scored on what level.
|
|
|
|
Scores which are the highest on a given level
|
|
|
|
are marked with asterisks
|
|
|
|
.Dq * .
|
|
|
|
.Sh FILES
|
|
|
|
.Bl -tag -width /var/games/tetris.scoresxx
|
|
|
|
.It /var/games/tetris.scores
|
|
|
|
high score file
|
|
|
|
.El
|
|
|
|
.Sh AUTHORS
|
|
|
|
Adapted from a 1989 International Obfuscated C Code Contest winner by
|
|
|
|
Chris Torek and Darren F. Provine.
|
|
|
|
.Pp
|
|
|
|
Manual adapted from the original entry written by Nancy L. Tinkham and
|
|
|
|
Darren F. Provine.
|
1999-01-03 05:00:17 +03:00
|
|
|
.Pp
|
|
|
|
Code for previewing next shape added by Hubert Feyrer in 1999.
|
2005-09-15 06:09:41 +04:00
|
|
|
.Sh BUGS
|
|
|
|
The higher levels are unplayable without a fast terminal connection.
|