File: mgt.6

package info (click to toggle)
mgt 2.31-7
  • links: PTS
  • area: main
  • in suites: bullseye, sid
  • size: 460 kB
  • ctags: 582
  • sloc: ansic: 4,852; sh: 411; pascal: 329; makefile: 88; csh: 3
file content (555 lines) | stat: -rw-r--r-- 17,364 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
.\" Define keep macros as poor (wo)man's substitute for broken .DS/.DE macros
.deKS		\" start keep
.sp		\" make a little head room
.ev 1		\" collect text in new environment
.in 0n		\" set zero indent relative to previous environment
.nf		\" assume no-fill mode
.di GO		\" start diversion called GO
..
.deKE		\" end keep
.br		\" get last partial line
.di		\" end diversion
.ne \\n(dn	\" declare space needed for GO
.nf		\" bring GO back "as is"
.GO		\" output GO text
.ev		\" return to previous environment
.sp.5		\" a little room for the toes
..
.TH MGT 6  "9 July 1993"
.SH NAME
mgt - game record display/editor for the oriental game of go
.SH SYNOPSIS
.B mgt
[\-m filename] [\-s] [-t] [files]
.SH DESCRIPTION
Go is an ancient oriental strategy game based on the capturing of territory.
The players alternate putting stones on the board, 
trying to surround as many empty intersections as possible.  
.LP
.B Mgt
allows the user to examine Go game tree files created through the 
Macintosh(tm) programs 
.B Smart-Go (tm)
or
.B Go Explorer (tm). 
.B Mgt
also has basic Go game tree editing capabilities and may be used to
create or edit game tree files.
The on\-line material provided by a
rather extensive and growing database allows many hours of instructional
enjoyment of various studies and tutorials concerning the game of Go. 
.LP
.B Mailgo 
is a utility which manages E-mail Go games using  
.B mgt 
as the Go board editor.  It is included in the 
.B mgt 
package.  
.LP
The 
.B mgt 
program was originally developed to be a companion for the series, 
"From My Go Teacher",
archived bsdserver.ucsf.edu for ftp.
Also available is the Internet GO Board communications program, 'go',
also by Greg Hale, which connects up two terminals in real\-time
anywhere in the world, and the clients for the Internet
Go Server.
.SH COMMAND LINE OPTIONS
.TP 8
.B \-m filename
Invoke a set of options used by the 
.B mailgo
program for managing email games.  If a filename is specified for
loading (see below), the game record is loaded, and 
.B mgt
automatically moves to the end of the main variation of the game record.
The game can be modified without confirmation.
If the game record has been modified, 
it will be automatically saved, on exit, to the filename 
specified after the \-m and 
.B mgt
will return success (zero).  If the game record has not been modified, 
or has not been allowed to be saved, then 
.B mgt 
will return failure (nonzero). 
.LP
.TP 8
.B \-s
Change save format used to write save files.  The default save format is
the long format Smart\-Go file.  Using this option results in 
short format Smart\-Go files.
.LP
.TP 8
.B \-t
Invoke tutor mode where you select variations by playing on the board.
The key for making a move has special behavior in this mode.  See the 
section on the "space or 0" keyboard command for a description.
.LP
.TP 8
.B files
These are the files to be loaded.  The Unix and IBM version support 
wildcards.  If no file is specified, 
.B mgt 
loads a blank board.  If you attempt to modify a file that was loaded,
.B mgt 
will prompt for confirmation the first time.  
.LP
.SH OPERATION
.B Mgt
can be used to view and edit game records, 
or as an electronic game board for a two person 
game.  There are many keyboard commands which execute 
the various editing and display functions.
.LP
.TP 8
> 
Step down the game tree to the next move.  Stop at the end of a variation
and do not visit other variations.
.LP
.TP 8
<
Move back up the game tree.  (Previous move)
.LP
.TP 8
 .
Go to the next node using a tree traversal which will visit all nodes.
Sometimes the order of traversal can be confusing.
.LP
.TP 8
,
Go to the previous node -- the opposite of "." forward movement.
.LP
.TP 8
e
Go to end of the current variation.
.LP
.TP 8
b
Go to beginning of the game tree. 
.LP
.TP 8
}
Go forward like the "." command until a comment.
.LP
.TP 8
{
Go backwards like the "," command until a comment.
.LP
.TP 8
g
Go to a specified node.  Type in the desired node number.
.LP
.TP 8
] 
Move forward until there is a variation branch in the game tree.
.LP
.TP 8
[ 
Move backwards until there is a variation branch in the game tree.
.LP
.TP 8
k and i 
Scroll the game tree variation window up and down.
A \- at the top of the variation window, and 
a + at the bottom indicate that more variations are available.
.LP
.TP 8
j and u 
Scroll comment window up and down.
A \- at the top of the comment, and 
a + at the bottom indicate that more comments are available.
.LP
.TP 8
# 
Load new file.  Will prompt for confirmation if the current file has been
modified.
.LP
.TP 8
r
Load previous file.  (Reverse through the file list)
.LP
.TP 8
f
Load next file.  (Forward through the file list)
.LP
.TP 8
w 
Write out Smart\-Go file.  Will prompt for a filename.  The special 
filename * will save with the current name (which appears in the upper 
right corner).  
.LP
.TP 8
space or 0 
Make a move.  The current player turn is indicated by the > < 
around the captured stones on the lower right.
Normally, this adds the move to the game tree and moves to a new node.
In tutor mode, it checks the various game continuations.  If one of them 
contains the move you made, it moves to that variation.  If not, it prints 
an error message.  The game tree cannot be modified in tutor mode.
.LP
.TP 8
p 
Pass.  Enter a pass move.
.LP
.TP 8
o
Other player.  Changes whose turn it is, adding a token in the game tree to 
force the change whenever this node is visited.  If the player is forced by 
such a token, the current player turn is indicated by } { characters on the 
lower right.  
.LP
.TP 8
t
Toggle stone color.  Changes whose turn it is without adding any tokens in 
the game tree.  This will not work if the game tree has a PLayer token 
(generated by the o key) at the current node.
.LP 
.TP 8 
z 
Set/unset black stones. 
.LP 
.TP 8 
x 
Set/unset white stones. 
.LP 
.TP 8 
q or ESC.  
Quit.  q will 
prompt for confirmation.  ESC will not prompt for confirmation.  
.LP 
.TP 8 
v 
Create a variation below the current node.  The variation will initially
contain a null node.  You must move to that variation to make a move in
it.  If the "v" command is invoked at a node which is at the end of a
variation, variation "A" is created with a null node.  Subsequent
invocations of the "v" command will create the "B", "C"... variations. 
.LP 
.TP 8 
! 
Cut tree.  Moves the 
current node and everything below it to a temporary holding buffer.  (Moves 
your location back to the parent of the node you are one when you invoke it.) 
.LP 
.TP 8 
^ 
Paste tree.  Pastes the temporary holding buffer in after the 
current node.  Usually the  opposite of cutting the tree. 
.LP 
.TP 8 
c 
Edit the current comment.  
The editor has two models of operation.  The default model 
has been vaguely designed after emacs.
That means that the editor 
commands are either 'control-key'  or 'escape-key'.  The controls 
are configurable through an environment variable.  The notation
"^key" is used to indicate control keys, and "]key" is used to indicate
keys which should be preceeded by the escape character.

On some terminals, instead of ESC-key, you can press Alt-key or
Meta-key.  (On the IBM version, you can use the Alt key.)
Under VMS, the ESC key does not work.  VMS users may need to redefine
the edit keys.  

The second edit model was vaguely designed after vi.  That means that the 
editor has a command mode for cursor movement, etc. and an insert mode
for inserting text.  The vi model editor starts in insert mode.
The ESC key changes mode from insert mode to command mode.  If
pressed in command mode, the ESC key exits the comment editor 
and saves the comment.  The letters below are typed in
command mode to obtain the specified function. 
To leave command mode and enter insert mode, you must
use the function which is listed as the insert mode command.  This
defaults to 'R'.   To select the vi like mode of operation,
put _ASCEDVI in your MGT environment variable. 

Defaults are:
.in +4m
.ta
.ta \w'delete to end of line (kill)\ \ 'u +8m +
.nf
       Command	emacs	vi
cursor up    (previous line)	^P	k
cursor down  (next line)	^N	j
page up      (prev page)	]p	^B
page down    (next page)	]n	^F
cursor left  (back)	^B	h
cursor right (forward)	^F	l
beginning of line	^A	0
end of line	^E	$
beginning of comment	]<	H
end of comment	]>	L
delete one character	^D	x
delete to end of line (kill)	^K	D
toggle insert mode	^I	R
save comment	]z	w
exit, don't save comment	^W	q
.fi
.in -4m

Pressing c on a comment larger than the 120 lines allocated for comments will 
cause the extra to be lost.  Also, on terminals which generate IBM PC arrow
key codes, the arrow keys will correctly move the cursor within the
comment editor.  The arrow keys only work in the emacs based model.
.LP 
.TP 8 
d 
Delete node.  Deletes the current node, replacing it with its 
child.  If the current node has no child, then clear the properties of the 
current node. 
.LP 
.TP 8 
n 
Name the current node.  You will be prompted for the 
name. 
.LP 
.TP 8 
s 
Score the game.  After selecting this, move the cursor 
around and remove the dead groups with 0 or space.  You can undo one (and 
only one) kill with the u key.  Pressing return will 
score the game and print the (Japanese) score in the comment area.
If you missed some dead groups, continue removing them.  Press q when you 
wish to exit scoring mode.  You will be prompted to either keep the score 
information as a comment for the current node or restore the old comment.
.LP
.TP 8
Ctrl\-I
Enter info mode.  In this mode, the various informational properties of the 
current file are displayed and may be edited.  To edit an item, press the 
letter associated with it, and enter the new text.  This letter must be 
entered in upper case.  To see a list of letters, press ?.  
The comment window scrolling keys can be used to 
scroll the info display.  The supported info properties are:
Size,
Handicap,
playerBlack,
bLackrank,
playerWhite,
whIterank,
Gamename,
Event,
rouNd,
Date,
Place,
Time,
Result,
gameComment,
sOurce,
User,
Komi.  The capital letters in this list indicate which letter selects that 
info property.  
.LP
.TP 8
Ctrl\-T
Toggle tutor mode.  (See the section on space or 0 for explanation.)
.LP
.TP 8
Ctrl\-W
Toggle the format used for writing Smart\-Go files between long and short.  
.LP
.TP 8
Ctrl\-L 
Refresh the screen.
.LP
.TP 8
Ctrl\-F 
Save the current screen to a file.
.LP
.TP 8
? 
Display a help screen.
.LP
.TP 8
12346789 
Move the cursor around.  Assumes standard numeric keypad orientation.
.LP
.SH ENVIRONMENT SETTINGS
All of the characters used for the commands and the display are configurable 
via environment variables.  For the ascii interface, use:
.LP
.sp
.if n \{.nf
setenv MGT '_ASCCOM:q><.,eb}{][gwzxv\\!lm#^cdn
                    spotrfLWTFI012346789kiju&
            _ASCCHAR:#O:+\-.+|\-++++
            _ASCINV _ASCED:PNpnBFAE<>DKIzO'
       (command should appear all on one line with a 
        single space separating _ASC... from the
        previous string.)
.fi
\}
.if t \{.nf
setenv MGT '_ASCCOM:q><.,eb}{][gwzxv\\!lm#^cdnspotrfLWTFI012346789kiju&
            _ASCCHAR:#O=+\-.+|\-++++
            _ASCINV _ASCED:PNpnBFAE<>DKIzW' 
.fi 
.in +.25i 
(command should appear all 
on one line with a single space separating _ASC... from the previous string.) 
.in -.25i 
\} 
.LP 
to get the default characters.  (This is csh syntax.  For 
other shells, the syntax will be different.)  
Place this line in your .cshrc so the alternate characters are 
always in effect.  
.LP
The _ASCCOM string allows you to change the keyboard 
commands.  Upper case letters stand for control characters. 
.LP
The _ASCCHAR 
string specifies the display characters.  For example, to use @ for black 
stones, change the # to @ in the _ASCCHAR string.
You need only include one of the two declarations ("_ASCCOM:" or 
"_ASCCHAR:") if you only want to change the commands or characters
but not both.
.LP
To set the default display type to inverse video, use _ASCINV in the 
MGT environment variable.
.LP
To set the comment editor commands, use _ASCED in the 
MGT environment variable.

For the _ASCED environment variable setting in the emacs based editor model, 
control keys are specified with a 
capital letter, and ESC keys are anything which is not a capital letter.
This is the key string for the defaults: PNpnBFAE<>DKIzO.  
Note that ^V, ^O, ^C and ^Z are poor characters to use for
anything if you have berkeley unix 
because the berkeley tty drivers interpret these characters.
The ^V character is the quoting character which quotes the following
character.  You will need to press it twice for mgt to see it.
The other characters have to be quoted by first pressing ^V or mgt
will not recognize your keypress.  You cannot use ^H or ^? for
anything because the editor always interprets these as destructive
backspace.  

For the _ASCED environment variable setting in the vi based editor model, 
no special processing is done on the characters.
In order to specify control keys, you must place actual control 
characters into your environment string.
The default string has
two control commands (^B and ^F) defined.
This is the default: kj^B^Fhl0$HLxDRwq.  The vi based editor model may
be selected be including _ASCEDVI in the environment variable.
.LP
If you wish to include control characters in your string, you can do
this most easily by editing a file which sets the environment.  Vi can
insert most of the control characters directly. 
.LP
In all cases, when you set your own keys, you must set all of the keys, 
and they must appear in the correct order.  If you give assign the
same key to different functions, then an arbitrary one will be used
by 
.B mgt 
and the other functions will be unavailable.
If multiple contradictory specifications occur in the
.B mgt
environment variable, the last that appear will be used by the program. 
Any option not specified will assume the default values identified above.
.LP
With the IBM version, the same effects may be achieved under DOS 4.0 or
DOS 5.0 with
a SET command placed in the AUTOEXEC.BAT file.  Under previous DOS 
versions, quotes were interpreted literally and "|", ">" and "<" characters
have special meanings and thus cannot be put into environment variables
with the SET command.
.LP
Under VMS, the command is just MGT = "_ASCCHAR:..."
.LP
.SH COMMENT FORMATTING
Comments are expected to consist of long lines, each of which is one 
paragraph.  A single long line will be formatted to fit the display. 
Line breaks will be ignored if they are preceeded by a space, but will be 
respected otherwise. 
.SH DISPLAYS
All displays have in common the purpose of displaying a go tree.
.LP
.ft CW
.KS
ASCII display:
    A B C D E F G H  S T
   +---------------  ---+   -Suppose this is the second
 19|. . . # . . . .  . .|19| line of the comment.  Since
 18|. O O # # # O .  . .|18| there is some more of the
 17|. # # O O O O .  . .|17| comment above us unseen, 
 16|. # O + . . . .  . .|16| the - appears to the left
 15|. # O . O . . .  . .|15| of 'Suppose'.
 14|. . # O . . . .  . .|14|
 13|. . # . . . . .  . .|13|
 12|. . . . . . . .  . .|12|
 11|. . . . . . . .  . .|11| And here, when there is
 10|. . . + . . . .  . .|10| more of the comment
  9|. . . . . . . .  . .| 9| below, the '+'
  8|. . . . . . . .  . .| 8|+appears to our left.
  7|. . . . . . . .  . .| 7|
  6|. . . . . . . .  . .| 6|   Node #173: Name
  5|. . . . . . . .  . .| 5|-B: variation 1 hit 'B' to see
  4|. . . + . . . .  . .| 4| C: variation 2 hit 'C'
  3|. . . . . . . .  . .| 3| D: variation 3 etc...            
  2|. . . . . . . .  . .| 2| E: variation 4
  1|. . . . . . . .  . .| 1|+F: variation 5
   +---------------  ---+    ? for help    read   long
    A B C D E F G H  S T     
 Black #11 at 'D19'               #: 0      > O: 0 <
.KE
.LP
The bottom line indicates that Black has just made move #11.  On the bottom 
right, the angle brackets around the white stone indicate that it is 
White's turn.  Above that, the word "read" indicates that the Smart\-Go file 
hasn't been modified, and "long" indicates that the default save format is 
the long format.  "Read" will change to "edit" if you modify the file, and 
it will say "tutor" if you enter tutor mode.
.SH FILES
wrapmgt - prepare short format Smart-Go files for mailing
.LP
mailgo - email go game management
.LP
mgt2short - script to convert Smart-Go files to short format
.LP
RULES - an introduction to the game in Smart-Go format.
.LP
The 
.B From My Go Teacher
tutorial lessons, and many professional game records all available at 
bsdserver.ucsf.edu
.LP
Internet go, a program to play go over internet, available on
bsdserver.ucsf.edu
.LP 
Smart\-Go.def, the Smart\-Go format definition.
.sp
.SH BUGS
.LP
Comment editing is limited to 120 screen lines.
.LP
Most, but not all, of the Smart-Go properties are supported.
.LP
Send bug reports to "adrian@bsdserver.ucsf.edu"
or "hale@scam.Berkeley.EDU"
.fi
.sp
.SH AUTHORS
Greg Hale
.LP
Jeff Boscole
.LP
Adrian Mariano (adrian@bsdserver.ucsf.edu)
.LP
Mike Dobbins (mdobbins@asns.tredydev.unisys.com)
.sp
.SH SEE ALSO
rec.games.go \- a newsgroup on the game
.br
Graded go problems for beginners, vol 1-4,
Ishi Press 
.br
In the Beginning, 
Ishi Press.
.br
The Treasure Chest Enigma, 
Ishi Press.