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