blob: 12295a3195800aa7453572a47120376442620f64 [file] [log] [blame]
Steve Kondikae271bc2015-11-15 02:50:53 +01001.\"***************************************************************************
micky3879b9f5e72025-07-08 18:04:53 -04002.\" Copyright 2020,2021 Thomas E. Dickey *
3.\" Copyright 1998,2006 Free Software Foundation, Inc. *
Steve Kondikae271bc2015-11-15 02:50:53 +01004.\" *
5.\" Permission is hereby granted, free of charge, to any person obtaining a *
6.\" copy of this software and associated documentation files (the *
7.\" "Software"), to deal in the Software without restriction, including *
8.\" without limitation the rights to use, copy, modify, merge, publish, *
9.\" distribute, distribute with modifications, sublicense, and/or sell *
10.\" copies of the Software, and to permit persons to whom the Software is *
11.\" furnished to do so, subject to the following conditions: *
12.\" *
13.\" The above copyright notice and this permission notice shall be included *
14.\" in all copies or substantial portions of the Software. *
15.\" *
16.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
17.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
18.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
19.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
20.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
21.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
22.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
23.\" *
24.\" Except as contained in this notice, the name(s) of the above copyright *
25.\" holders shall not be used in advertising or otherwise to promote the *
26.\" sale, use or other dealings in this Software without prior written *
27.\" authorization. *
28.\"***************************************************************************
29.\"
micky3879b9f5e72025-07-08 18:04:53 -040030.\" $Id: bs.6,v 1.5 2021/06/17 21:20:30 tom Exp $
31.TH BATTLESHIPS 6 2021-06-17 ncurses-examples Games
Steve Kondikae271bc2015-11-15 02:50:53 +010032.SH NAME
33bs \- battleships game
34.SH SYNOPSIS
35battle [ -b | -s ] [ -c ]
36.SH DESCRIPTION
37This program allows you to play the familiar Battleships game against the
38computer on a 10x10 board. The interface is visual and largely
39self-explanatory; you place your ships and pick your shots by moving the
40cursor around the `sea' with the rogue/hack motion keys hjklyubn.
41.PP
42Note that when selecting a ship to place, you must type the capital letter
43(these are, after all, capital ships). During ship placement, the `r' command
44may be used to ignore the current position and randomly place your currently
45selected ship. The `R' command will place all remaining ships randomly. The ^L
46command (form feed, ASCII 12) will force a screen redraw).
47.PP
micky3879b9f5e72025-07-08 18:04:53 -040048The command-line arguments control game modes.
Steve Kondikae271bc2015-11-15 02:50:53 +010049
50.nf
51 -b selects a `blitz' variant
52 -s selects a `salvo' variant
53 -c permits ships to be placed adjacently
54.fi
55
56The `blitz' variant allows a side to shoot for as long as it continues to
57score hits.
58.PP
59The `salvo' game allows a player one shot per turn for each of his/her ships
60still afloat. This puts a premium scoring hits early and knocking out some
61ships and also makes much harder the situation where you face a superior force
62with only your PT-boat.
63.PP
64Normally, ships must be separated by at least one square of open water. The
65-c option disables this check and allows them to close-pack.
66.PP
67The algorithm the computer uses once it has found a ship to sink is provably
68optimal. The dispersion criterion for the random-fire algorithm may not be.
69.SH AUTHORS
70Originally written by one Bruce Holloway in 1986. Salvo mode added by Chuck A.
71DeGaul (cbosgd!cad). Visual user interface, `closepack' option, code rewrite
72and manual page by Eric S. Raymond <esr@snark.thyrsus.com> August 1989.