xref: /openbsd/games/bs/bs.6 (revision 3d8817e4)
1.\"	$OpenBSD: bs.6,v 1.13 2008/05/20 14:42:09 jmc Exp $
2.\"
3.\" Copyright (c) 1997, Jason Downs.  All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
15.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17.\" DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
18.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
21.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
26.Dd $Mdocdate: May 20 2008 $
27.Dt BS 6
28.Os
29.Sh NAME
30.Nm bs
31.Nd battleships game
32.Sh SYNOPSIS
33.Nm bs
34.Op Fl b | s
35.Op Fl c
36.Sh DESCRIPTION
37This program allows you to play the familiar Battleships game against the
38computer on a 10x10 board.
39The interface is visual and largely self-explanatory;
40you place your ships and pick your shots by moving the cursor around the
41.Sq sea
42with the
43.Xr hack 6
44motion keys
45.Em hjklyubn .
46.Pp
47Note that when selecting a ship to place, you must type the capital letter
48(these are, after all, capital ships).
49During ship placement, the
50.Sq r
51command may be used to ignore the current position and randomly place your
52currently selected ship.
53The
54.Sq R
55command will place all remaining ships randomly.
56The ^L command
57.Pq form feed, ASCII 12
58will force a screen redraw.
59.Pp
60The command-line arguments control game modes:
61.Bl -tag -width XxXXX
62.It Fl b
63Selects a
64.Sq blitz
65variant.
66This allows a side to shoot for as long as it continues to score hits.
67.It Fl c
68Permits ships to be placed adjacently.
69Normally, ships must be separated by at least one square of open water.
70This disables that check and allows them to close-pack.
71.It Fl s
72Selects a
73.Sq salvo
74variant.
75This allows a player one shot per turn for each of his/her
76ships still afloat.
77This puts a premium on scoring hits early and knocking out
78some ships and also makes it much harder, for example, when you face a superior
79force with only your PT-boat.
80.El
81.Sh AUTHORS
82Originally written by one Bruce Holloway in 1986.
83Salvo mode added by Chuck A. DeGaul (cbosgd!cad).
84Visual user interface,
85.Sq closepack
86option, code rewrite
87and manual page by
88.An Eric S. Raymond Aq esr@snark.thyrsus.com ,
89August 1989.
90.Sh NOTES
91The algorithm the computer uses once it has found a ship to sink is provably
92optimal.
93The dispersion criterion for the random-fire algorithm may not be.
94