xref: /openbsd/games/bs/bs.6 (revision 5af055cd)
1.\"	$OpenBSD: bs.6,v 1.15 2014/09/08 01:27:54 schwarze 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: September 8 2014 $
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
82.An -nosplit
83Originally written by one
84.An Bruce Holloway
85in 1986.
86Salvo mode added by
87.An Chuck A. DeGaul Aq Mt cbosgd!cad .
88Visual user interface,
89.Sq closepack
90option, code rewrite
91and manual page by
92.An Eric S. Raymond Aq Mt esr@snark.thyrsus.com ,
93August 1989.
94.Sh NOTES
95The algorithm the computer uses once it has found a ship to sink is provably
96optimal.
97The dispersion criterion for the random-fire algorithm may not be.
98