xref: /netbsd-src/games/worms/worms.6 (revision 8552e825c799c1455e20298e5e4902e9d0f5cc16)
1.\"	$NetBSD: worms.6,v 1.18 2023/04/26 22:58:09 kre Exp $
2.\"
3.\" Copyright (c) 1989, 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.\"	@(#)worms.6	8.1 (Berkeley) 5/31/93
31.\"
32.Dd April 26, 2023
33.Dt WORMS 6
34.Os
35.Sh NAME
36.Nm worms
37.Nd animate worms on a display terminal
38.Sh SYNOPSIS
39.Nm
40.Op Fl CfHrt
41.Op Fl d Ar delay
42.Op Fl l Ar length
43.Op Fl n Ar number
44.Op Fl S Ar seed
45.Sh DESCRIPTION
46.Nm
47is a
48.Ux
49version of the DEC-2136 program
50.Dq worms .
51.Pp
52The options are as follows:
53.Bl -compact -tag -width Fl
54.Pp
55.It Fl C
56Use colours, if available, to make the worms easier to distinguish.
57.Pp
58.It Fl d Ar delay
59Specifies a
60.Ar delay ,
61in milliseconds, between each update.
62This is useful for fast terminals.
63Reasonable values are around 20-200;
64the default is 20.
65.Pp
66.It Fl f
67Makes a
68.Dq field
69for the worm(s) to eat.
70.Pp
71.It Fl H
72Display the head of the worm differently than its body.
73.Pp
74.It Fl l Ar length
75.It Fl l Ar min Ns \(mi Ns Ar max
76Specifies the
77.Ar length
78of each worm; the default is 16, the minimum is 2.
79In the second form, worm lengths are randomly chosen
80between
81.Ar min
82.Pq which must be at least 2
83and
84.Ar max .
85The
86.Ar max
87worm length will be reduced if required by the screen
88size and the
89.Ar number
90of worms selected.
91This option overrides any earlier
92.Fl r .
93.Pp
94.It Fl n Ar number
95Specifies the
96.Ar number
97of worms; the default is 3.
98There must be at least one.
99.Pp
100.It Fl r
101Use random lengths for the worms, within a range of
102sizes chosen to suit the screen size.
103Note this option overrides any earlier
104.Fl l .
105.Pp
106.It Fl S Ar seed
107Provide an integer
108.Ar seed
109for the random number generator.
110Specifying zero (0, the default) causes a random seed to be used.
111.Pp
112.It Fl t
113Makes each worm leave a trail behind it.
114.El
115.Pp
116The maximum
117.Ar length ,
118and
119.Ar number ,
120of worms depends upon the screen size, though the
121.Ar length
122can never exceed 1024.
123If the screen is particularly small, even the defaults
124for those may be too large.
125Screens with less than 3 rows or columns cannot be handled,
126nor can ones with insufficient total space.
127