1*60856Sbostic.\" Copyright (c) 1992, 1993 2*60856Sbostic.\" The Regents of the University of California. All rights reserved. 357278Sbostic.\" 457289Sbostic.\" This code is derived from software contributed to Berkeley by 557289Sbostic.\" Nancy L. Tinkham and Darren F. Provine. 657289Sbostic.\" 757278Sbostic.\" %sccs.include.redist.man% 857278Sbostic.\" 9*60856Sbostic.\" @(#)tetris.6 8.1 (Berkeley) 05/31/93 1057278Sbostic.\" 1157278Sbostic.Dd "" 1257278Sbostic.Dt TETRIS 6 1357278Sbostic.Os 1457278Sbostic.Sh NAME 1557278Sbostic.Nm tetris 1657278Sbostic.Nd the game of tetris 1757278Sbostic.Sh SYNOPSIS 1857278Sbostic.Nm 1957289Sbostic.Op Fl s 2057289Sbostic.Op Fl k Ar keys 2157289Sbostic.Op Fl l Ar level 2257278Sbostic.Sh DESCRIPTION 2357278SbosticThe 2457278Sbostic.Nm 2557278Sbosticcommand runs display-based game which must be played on a CRT terminal. 2657278SbosticThe object is to fit the shapes together forming complete rows, 2757278Sbosticwhich then vanish. 2857278SbosticWhen the shapes fill up to the top, the game ends. 2957278SbosticYou can optionally select a level of play, or custom-select control keys. 3057278Sbostic.Pp 3157289SbosticThe default level of play is 2. 3257278Sbostic.Pp 3357278SbosticThe default control keys are as follows: 3457289Sbostic.Pp 3557289Sbostic.Bl -tag -width "<space>" -compact -offset indent 3657278Sbostic.It j 3757278Sbosticmove left 3857278Sbostic.It k 3957278Sbosticrotate 1/4 turn counterclockwise 4057278Sbostic.It l 4157278Sbosticmove right 4257278Sbostic.It <space> 4357278Sbosticdrop 4457278Sbostic.It p 4557278Sbosticpause 4657278Sbostic.It q 4757278Sbosticquit 4857278Sbostic.El 4957289Sbostic.Pp 5057289SbosticThe options are as follows: 5157289Sbostic.Bl -tag -width indent 5257289Sbostic.It Fl k 5357289SbosticThe default control keys can be changed using the 5457289Sbostic.Fl k option. 5557289SbosticThe 5657289Sbostic.Ar keys 5757289Sbosticargument must have the six keys in order, and, remember to quote any 5857289Sbosticspace or tab characters from the shell. 5957289SbosticFor example: 6057289Sbostic.sp 6157289Sbostic.Dl "tetris -l 2 -k 'jkl pq'" 6257289Sbostic.sp 6357289Sbosticwill play the default games, i.e. level 2 and with the default 6457289Sbosticcontrol keys. 6557289SbosticThe current key settings are displayed at the bottom of the screen 6657289Sbosticduring play. 6757289Sbostic.It Fl l 6857289SbosticSelect a level of play. 6957289Sbostic.It Fl s 7057289SbosticDisplay the top scores. 7157289Sbostic.El 7257289Sbostic.Pp 7357278Sbostic.Sh PLAY 7457278SbosticAt the start of the game, a shape will appear at the top of the screen, 7557278Sbosticfalling one square at a time. 7657278SbosticThe speed at which it falls is determined directly by the level: 7757278Sbosticif you select level 2, the blocks will fall twice per second; 7857278Sbosticat level 9, they fall 9 times per second. 7957278Sbostic(As the game goes on, things speed up, 8057278Sbosticno matter what your initial selection.) 8157278SbosticWhen this shape 8257278Sbostic.Dq "touches down" 8357278Sbosticon the bottom of the field, another will appear at the top. 8457278Sbostic.Pp 8557278SbosticYou can move shapes to the left or right, rotate them counterclockwise, 8657278Sbosticor drop them to the bottom by pressing the appropriate keys. 8757278SbosticAs you fit them together, completed horizontal rows vanish, 8857278Sbosticand any blocks above fall down to fill in. 8957278SbosticWhen the blocks stack up to the top of the screen, the game is over. 9057278Sbostic.Sh SCORING 9157278SbosticYou get one point for every block you fit into the stack, 9257278Sbosticand one point for every space a block falls when you hit the drop key. 9357278Sbostic(Dropping the blocks is therefore a good way to increase your score.) 9457278SbosticYour total score is the product of the level of play 9557278Sbosticand your accumulated 9657278Sbostic.ie t points\(em200 9757278Sbostic.el points -- 200 9857278Sbosticpoints on level 3 gives you a score of 600. 9957278SbosticEach player gets at most one entry on any level, 10057289Sbosticfor a total of nine scores in the high scores file. 10157278SbosticPlayers who no longer have accounts are limited to one score. 10257278SbosticAlso, scores over 5 years old are expired. 10357289SbosticThe exception to these conditions is that the highest score on a given 10457289Sbosticlevel is 10557278Sbostic.Em always 10657278Sbostickept, 10757289Sbosticso that following generations can pay homage to those who have 10857289Sbosticwasted serious amounts of time. 10957278Sbostic.Pp 11057278SbosticThe score list is produced at the end of the game. 11157278SbosticThe printout includes each player's overall ranking, 11257278Sbosticname, score, and how many points were scored on what level. 11357278SbosticScores which are the highest on a given level 11457278Sbosticare marked with asterisks 11557278Sbostic.Dq * . 11657278Sbostic.Sh FILES 11757278Sbostic.Bl -tag -width /var/games/tetris.scoresxx 11857278Sbostic.It /var/games/tetris.scores 11957278Sbostichigh score file 12057278Sbostic.El 12157278Sbostic.Sh BUGS 12257278SbosticThe higher levels are unplayable without a fast terminal connection. 12357278Sbostic.Sh AUTHORS 12457278SbosticAdapted from a 1989 International Obfuscated C Code Contest winner by 12557289SbosticChris Torek and Darren F. Provine. 12657278Sbostic.Pp 12757289SbosticManual adapted from the original entry written by Nancy L. Tinkham and 12857289SbosticDarren F. Provine. 129