MGT(6) | Games Manual | MGT(6) |
mgt - game record display/editor for the oriental game of go
mgt [-m filename] [-s] [-t] [files]
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.
Mgt allows the user to examine Go game tree files created through the Macintosh(tm) programs Smart-Go (tm) or Go Explorer (tm). 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.
Mailgo is a utility which manages E-mail Go games using mgt as the Go board editor. It is included in the mgt package.
The 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.
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.
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:
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
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.
All of the characters used for the commands and the display are configurable via environment variables. For the ascii interface, use:
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.)
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.
The _ASCCOM string allows you to change the keyboard commands. Upper case letters stand for control characters.
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.
To set the default display type to inverse video, use _ASCINV in the MGT environment variable.
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.
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.
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 mgt and the other functions will be unavailable. If multiple contradictory specifications occur in the mgt environment variable, the last that appear will be used by the program. Any option not specified will assume the default values identified above.
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.
Under VMS, the command is just MGT = "_ASCCHAR:..."
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.
All displays have in common the purpose of displaying a go tree.
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 <
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.
wrapmgt - prepare short format Smart-Go files for mailing
mailgo - email go game management
mgt2short - script to convert Smart-Go files to short format
RULES - an introduction to the game in Smart-Go format.
The From My Go Teacher tutorial lessons, and many professional game records all available at bsdserver.ucsf.edu
Internet go, a program to play go over internet, available on bsdserver.ucsf.edu
Smart-Go.def, the Smart-Go format definition.
Comment editing is limited to 120 screen lines.
Most, but not all, of the Smart-Go properties are supported.
Send bug reports to "adrian@bsdserver.ucsf.edu" or
"hale@scam.Berkeley.EDU"
Greg Hale
Jeff Boscole
Adrian Mariano (adrian@bsdserver.ucsf.edu)
Mike Dobbins (mdobbins@asns.tredydev.unisys.com)
rec.games.go - a newsgroup on the game
Graded go problems for beginners, vol 1-4, Ishi Press
In the Beginning, Ishi Press.
The Treasure Chest Enigma, Ishi Press.
9 July 1993 |