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