xref: /netbsd-src/games/tetris/tetris.6 (revision ae9172d6cd9432a6a1a56760d86b32c57a66c39c)
1.\" Copyright (c) 1992, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" Nancy L. Tinkham and Darren F. Provine.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\" 3. All advertising materials mentioning features or use of this software
16.\"    must display the following acknowledgement:
17.\"	This product includes software developed by the University of
18.\"	California, Berkeley and its contributors.
19.\" 4. Neither the name of the University nor the names of its contributors
20.\"    may be used to endorse or promote products derived from this software
21.\"    without specific prior written permission.
22.\"
23.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33.\" SUCH DAMAGE.
34.\"
35.\"	@(#)tetris.6	8.1 (Berkeley) 5/31/93
36.\"
37.Dd "May 31, 1993"
38.Dt TETRIS 6
39.Os
40.Sh NAME
41.Nm tetris
42.Nd the game of tetris
43.Sh SYNOPSIS
44.Nm
45.Op Fl s
46.Op Fl k Ar keys
47.Op Fl l Ar level
48.Sh DESCRIPTION
49The
50.Nm
51command runs display-based game which must be played on a CRT terminal.
52The object is to fit the shapes together forming complete rows,
53which then vanish.
54When the shapes fill up to the top, the game ends.
55You can optionally select a level of play, or custom-select control keys.
56.Pp
57The default level of play is 2.
58.Pp
59The default control keys are as follows:
60.Pp
61.Bl -tag -width "<space>" -compact -offset indent
62.It j
63move left
64.It k
65rotate 1/4 turn counterclockwise
66.It l
67move right
68.It <space>
69drop
70.It p
71pause
72.It q
73quit
74.El
75.Pp
76The options are as follows:
77.Bl -tag -width indent
78.It Fl k
79The default control keys can be changed using the
80.Fl k option.
81The
82.Ar keys
83argument must have the six keys in order, and, remember to quote any
84space or tab characters from the shell.
85For example:
86.sp
87.Dl "tetris -l 2 -k 'jkl pq'"
88.sp
89will play the default games, i.e. level 2 and with the default
90control keys.
91The current key settings are displayed at the bottom of the screen
92during play.
93.It Fl l
94Select a level of play.
95.It Fl s
96Display the top scores.
97.El
98.Pp
99.Sh PLAY
100At the start of the game, a shape will appear at the top of the screen,
101falling one square at a time.
102The speed at which it falls is determined directly by the level:
103if you select level 2, the blocks will fall twice per second;
104at level 9, they fall 9 times per second.
105(As the game goes on, things speed up,
106no matter what your initial selection.)
107When this shape
108.Dq "touches down"
109on the bottom of the field, another will appear at the top.
110.Pp
111You can move shapes to the left or right, rotate them counterclockwise,
112or drop them to the bottom by pressing the appropriate keys.
113As you fit them together, completed horizontal rows vanish,
114and any blocks above fall down to fill in.
115When the blocks stack up to the top of the screen, the game is over.
116.Sh SCORING
117You get one point for every block you fit into the stack,
118and one point for every space a block falls when you hit the drop key.
119(Dropping the blocks is therefore a good way to increase your score.)
120Your total score is the product of the level of play
121and your accumulated
122.ie t points\(em200
123.el points -- 200
124points on level 3 gives you a score of 600.
125Each player gets at most one entry on any level,
126for a total of nine scores in the high scores file.
127Players who no longer have accounts are limited to one score.
128Also, scores over 5 years old are expired.
129The exception to these conditions is that the highest score on a given
130level is
131.Em always
132kept,
133so that following generations can pay homage to those who have
134wasted serious amounts of time.
135.Pp
136The score list is produced at the end of the game.
137The printout includes each player's overall ranking,
138name, score, and how many points were scored on what level.
139Scores which are the highest on a given level
140are marked with asterisks
141.Dq * .
142.Sh FILES
143.Bl -tag -width /var/games/tetris.scoresxx
144.It /var/games/tetris.scores
145high score file
146.El
147.Sh BUGS
148The higher levels are unplayable without a fast terminal connection.
149.Sh AUTHORS
150Adapted from a 1989 International Obfuscated C Code Contest winner by
151Chris Torek and Darren F. Provine.
152.Pp
153Manual adapted from the original entry written by Nancy L. Tinkham and
154Darren F. Provine.
155