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