Goban

Synopsis

goban [name]

Features
	- save and restore games.
	- step forwards and backwards in moves of a game.
	- automatic capture of stones.
	- detects ko violations and suicide moves (illegal).
	- laserwriter output for board diagrams.
	- confirmation required for irrevocable actions
	- dynamic resizing of tool window
	- automatic handicap placement for 19 x 19 board (up to
	  17 stones).
	- can start games with placed stones for go problems.
	- default game from "Master of Go" by Kawabata.

Description

Goban is Japanese for "go board".  It is an automatic board, but
does not play go.  If you invoke it with no arguments it will
initialize itself with the game described in the book "The
Master of Go", by Yasunari Kawabata, winner of the Nobel Prize
for Literature.  If you give it an argument, it will use that as
a base to construct names for files of which there are two
(assume "name" is the argument):  "name.game" and "name.brd".
"name.game" is read and written by goban, and is the record of
the game, including handicaps and initial positions of stones
(for go problems).   "name.brd" is written only and is an ascii
representation of the board and the moves, suitable for
electronic mailing.

There are four windows.  The two wide ones at the top of the
tool are for messages.  The lower part of goban consists of a
board diagram and a control panel.

The top window explains what actions the mouse buttons perform
at a given moment.  When confirmation of a command is required
the message will say "Confirm:  right mouse button.  Deny:  Left
and center buttons."  The second window displays the number of
captured stones.

Stones are placed on the board by selecting the grid point with
the cursor and pressing the left button.  In the control panel
the color of the stone of the player to play next ("Next:") will
change.  If the center button is pressed in the board area,
goban will backup a move (undo it).  The right button causes
goban to move forward in the game.  Stepping backwards and
forwards will not alter the game until the left button is
pressed to place a stone.  Then any moves beyond the current
position will be discarded.

The control panel provides the following controls:

Moving (Placing):  Pressing this button changes the state from
making moves to placing stones or vice versa.  The current state
is indicated.  If stones are being "placed" then the color of
the next stone to be placed will not change unless the stone
beside the label "Next:" (or the label) is hit with the left
mouse button.  Placing stones should be done only after a
"Reset" has been issued (see "Reset") (but this is not
enforced).

Pass:  The "pass" move is made (no stone is placed) and it is
the next player's turn.

Replay:  Redraws the board.

Close:  Closes goban to iconic state.

Quit:  Exit the goban program.  Must be confirmed with right mouse
button.

Reset:  Reset the state of the game to it's initial state which
is that no moves have been made, but the handicap stones are on
the board.  (See "Handicap").  Must be confirmed with right
mouse button.

Current Move (Slider):  Replay the game to the move number
controlled by the slider when the mouse button is released.

Handicap (Slider):  Control the number of handicap stones that
will be automatically placed if "Reset" is issued.

Game:  Type in and change the name that is used to form the file
names used to save the game record and the ascii board
representation.  ("name.game" and "name.brd").

Read Game:  Read in a new game record (if the "Game:" name has
been changed) or reread the current game record from
"name.game".  Must be confirmed with right mouse button.

Print:  Goban will send PostScript commands to the printer in
the system that goes by the tag "Plw" (normally the default Sun
laser writer).  A diagram of the board will be printed.

Write Game:  Write the current state of the game to "name.game"
where "name" is the value of the "Game:" panel button.  Must be
confirmed with right mouse button.

Write Board:  Write an ascii representation of the board and the
moves to "name.brd" where "name" is the value of the "Game:"
panel button.  Must be confirmed with right mouse button.



Sample ".game" File (19x19 board, no handicap)

19
0
 .
 .
Black
 D3 Q16
 R4 C16
 C10 Q3
 R3 M3
 K16 G16
 N16 R10
 R8 C6
 C7 C3
 C4 E3
 B3


Sample ".brd" File (19x19 board, no handicap)

   A B C D E F G H J K L M N O P Q R S T
19 . . . . . . . . . . . . . . . . . . . 19
18 . . . . . . . . . . . . . . . . . . . 18
17 . . . . . . . . . . . . . . . . . . . 17
16 . . O . . . O . . * . . * . . O . . . 16
15 . . . . . . . . . . . . . . . . . . . 15
14 . . . . . . . . . . . . . . . . . . . 14
13 . . . . . . . . . . . . . . . . . . . 13
12 . . . . . . . . . . . . . . . . . . . 12
11 . . . . . . . . . . . . . . . . . . . 11
10 . . * . . . . . . . . . . . . . O . . 10
 9 . . . . . . . . . . . . . . . . . . .  9
 8 . . . . . . . . . . . . . . . . * . .  8
 7 . . * . . . . . . . . . . . . . . . .  7
 6 . . O . . . . . . . . . . . . . . . .  6
 5 . . . . . . . . . . . . . . . . . . .  5
 4 . . * . . . . . . . . . . . . . * . .  4
 3 . * O * O . . . . . . O . . . O * . .  3
 2 . . . . . . . . . . . . . . . . . . .  2
 1 . . . . . . . . . . . . . . . . . . .  1
   A B C D E F G H J K L M N O P Q R S T
  1:	D3	Q16.
  3:	R4	C16.
  5:	C10	Q3.
  7:	R3	M3.
  9:	K16	G16.
 11:	N16	R10.
 13:	R8	C6.
 15:	C7	C3.
 17:	C4	E3.
 19:	B3

