xref: /dragonfly/games/gomoku/gomoku.6 (revision 00b5bfed)
1.\"	$NetBSD: gomoku.6,v 1.15 2010/03/29 04:00:03 dholland Exp $
2.\"
3.\" Copyright (c) 1994
4.\"	The Regents of the University of California.  All rights reserved.
5.\"
6.\" This code is derived from software contributed to Berkeley by
7.\" Ralph Campbell.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\" 3. Neither the name of the University nor the names of its contributors
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 REGENTS AND CONTRIBUTORS ``AS IS'' AND
22.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28.\" HOWEVER 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.\"     @(#)gomoku.6	8.2 (Berkeley) 8/4/94
34.\"
35.Dd March 28, 2010
36.Dt GOMOKU 6
37.Os
38.Sh NAME
39.Nm gomoku
40.Nd game of 5 in a row
41.Sh SYNOPSIS
42.Nm
43.Op Fl bcdu
44.Op Fl D Ar debugfile
45.Op Ar savefile
46.Sh DESCRIPTION
47.Nm
48is a two player game where the object is to get 5 in a row horizontally,
49vertically or diagonally on a 19 by 19 grid.
50By convention, black always moves first.
51.Pp
52The options are:
53.Bl -tag -width Ds
54.It Fl b
55Run in batch mode.
56.Pq See below.
57.It Fl c
58Computer versus computer.
59.Nm
60will play a game against itself.
61This is mostly used for testing.
62.It Fl d
63Print debugging information.
64Repeating this option more than once yields more detailed information.
65.It Fl D Ar debugfile
66Print the debug information to
67.Ar debugfile
68instead of to the standard output.
69.It Fl u
70User versus user.
71.Pq Play against yourself.
72This is mostly used for testing.
73.It Ar savefile
74Load a previously saved game from
75.Pa savefile .
76.El
77.Pp
78With no arguments,
79.Nm
80starts a fresh user vs. computer game.
81.Pp
82Moves may be entered by selecting the desired board location and
83pressing the space or enter key.
84The cursor may be moved using the arrow keys or
85.Xr vi 1
86motion keys
87.Em hjklyubn .
88These also may be familiar from
89.Xr rogue 6
90and
91.Xr hack 6 .
92.\" Valid moves are a letter for the column and a number for the row
93.\" of an empty board location.
94To quit, type
95.Sq Q ,
96and to save the game, type
97.Sq S
98and supply a file name when prompted.
99.Ss Batch mode
100Batch mode was intended for game tournaments where a referee program
101handles the board display and pits one program against another.
102In this mode,
103.Nm
104reads moves from standard input and writes its responses to standard
105output.
106The first line of input should be either
107.Dq black
108or
109.Dq white
110to specify whether
111.Nm
112has the first move or not respectively.
113.Sh AUTHORS
114.An Ralph Campbell
115.Sh ACKNOWLEDGEMENTS
116The board display routines were based on the
117.Nm goref
118program written by Peter Langston.
119The user interface was based on Eric S. Raymond's interface for
120.Xr bs 6 .
121