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