1.\" Copyright (c) 1980, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 3. All advertising materials mentioning features or use of this software 13.\" must display the following acknowledgement: 14.\" This product includes software developed by the University of 15.\" California, Berkeley and its contributors. 16.\" 4. Neither the name of the University nor the names of its contributors 17.\" may be used to endorse or promote products derived from this software 18.\" without specific prior written permission. 19.\" 20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)snake.6 8.1 (Berkeley) 5/31/93 33.\" $FreeBSD: src/games/snake/snake/snake.6,v 1.4.2.1 2001/07/22 11:01:23 dd Exp $ 34.\" $DragonFly: src/games/snake/snake/snake.6,v 1.4 2007/03/27 10:08:02 swildner Exp $ 35.\" 36.Dd May 31, 1993 37.Dt SNAKE 6 38.Os 39.Sh NAME 40.Nm snake , 41.Nm snscore 42.Nd display chase game 43.Sh SYNOPSIS 44.Nm 45.Op Fl w Ar width 46.Op Fl l Ar length 47.Op Fl t 48.br 49.Nm snscore 50.Sh DESCRIPTION 51.Nm Snake 52is a display-based game which must be played on a CRT terminal. 53The object of the game is to make as much money as possible without 54getting eaten by the snake. 55The 56.Fl l 57and 58.Fl w 59options allow you to specify the length and width of the field. 60By default the entire screen is used. 61The 62.Fl t 63option makes the game assume you are on a slow terminal. 64.Pp 65You are represented on the screen by an I. 66The snake is 6 squares long and is represented by s's with an S at its head. 67The money is $, and an exit is #. 68Your score is posted in the upper left hand corner. 69.Pp 70You can move around using the same conventions as 71.Xr vi 1 , 72the 73.Ic h , 74.Ic j , 75.Ic k , 76and 77.Ic l 78keys work, as do the arrow keys. 79Other possibilities include: 80.Bl -tag -width indent 81.It Ic sefc 82These keys are like hjkl but form a directed pad around the d key. 83.It Ic HJKL 84These keys move you all the way in the indicated direction to the 85same row or column as the money. 86This does 87.Em not 88let you jump away from the snake, but rather saves you from having 89to type a key repeatedly. 90The snake still gets all his turns. 91.It Ic SEFC 92Likewise for the upper case versions on the left. 93.It Ic ATPB 94These keys move you to the four edges of the screen. 95Their position on the keyboard is the mnemonic, e.g., 96P is at the far right of the keyboard. 97.It Ic x 98This lets you quit the game at any time. 99.It Ic p 100Points in a direction you might want to go. 101.It Ic w 102Space warp to get out of tight squeezes, at a price. 103.El 104.Pp 105To earn money, move to the same square the money is on. 106A new $ will appear when you earn the current one. 107As you get richer, the snake gets hungrier. 108To leave the game, move to the exit (#). 109.Pp 110A record is kept of the personal best score of each player. 111Scores are only counted if you leave at the exit, 112getting eaten by the snake is worth nothing. 113.Pp 114As in pinball, matching the last digit of your score to the number 115which appears after the game is worth a bonus. 116.Pp 117To see who wastes time playing snake, run 118.Nm snscore . 119.Sh FILES 120.Bl -tag -width ".Pa /var/games/snakerawscores" -compact 121.It Pa /var/games/snakerawscores 122database of personal bests 123.It Pa /var/games/snake.log 124log of games played 125.El 126.Sh BUGS 127When playing on a small screen, 128it's hard to tell when you hit the edge of the screen. 129.Pp 130The scoring function takes into account the size of the screen. 131A perfect function to do this equitably has not been devised. 132