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