home *** CD-ROM | disk | FTP | other *** search
Emacs Compiled Lisp | 1994-05-04 | 21.0 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: Emacs Compiled Lisp
(other/emacsCompiledLisp).
This format is not currently supported by dexvert.
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 45 4c 43 13 00 00 00 | 0a 3b 3b 3b 20 63 6f 6d |;ELC....|.;;; com|
|00000010| 70 69 6c 65 64 20 62 79 | 20 6b 77 7a 68 40 68 61 |piled by| kwzh@ha|
|00000020| 6c 2e 67 6e 75 2e 61 69 | 2e 6d 69 74 2e 65 64 75 |l.gnu.ai|.mit.edu|
|00000030| 20 6f 6e 20 54 75 65 20 | 4d 61 79 20 20 33 20 32 | on Tue |May 3 2|
|00000040| 31 3a 34 39 3a 34 36 20 | 31 39 39 34 0a 3b 3b 3b |1:49:46 |1994.;;;|
|00000050| 20 66 72 6f 6d 20 66 69 | 6c 65 20 2f 67 64 2f 67 | from fi|le /gd/g|
|00000060| 6e 75 2f 65 6d 61 63 73 | 2f 31 39 2e 30 2f 6c 69 |nu/emacs|/19.0/li|
|00000070| 73 70 2f 67 6f 6d 6f 6b | 75 2e 65 6c 0a 3b 3b 3b |sp/gomok|u.el.;;;|
|00000080| 20 65 6d 61 63 73 20 76 | 65 72 73 69 6f 6e 20 31 | emacs v|ersion 1|
|00000090| 39 2e 32 32 2e 39 32 2e | 32 2e 0a 3b 3b 3b 20 62 |9.22.92.|2..;;; b|
|000000a0| 79 74 65 63 6f 6d 70 20 | 76 65 72 73 69 6f 6e 20 |ytecomp |version |
|000000b0| 46 53 46 20 32 2e 31 30 | 0a 3b 3b 3b 20 6f 70 74 |FSF 2.10|.;;; opt|
|000000c0| 69 6d 69 7a 61 74 69 6f | 6e 20 69 73 20 6f 6e 2e |imizatio|n is on.|
|000000d0| 0a 3b 3b 3b 20 74 68 69 | 73 20 66 69 6c 65 20 75 |.;;; thi|s file u|
|000000e0| 73 65 73 20 6f 70 63 6f | 64 65 73 20 77 68 69 63 |ses opco|des whic|
|000000f0| 68 20 64 6f 20 6e 6f 74 | 20 65 78 69 73 74 20 69 |h do not| exist i|
|00000100| 6e 20 45 6d 61 63 73 20 | 31 38 2e 0a 0a 28 69 66 |n Emacs |18...(if|
|00000110| 20 28 61 6e 64 20 28 62 | 6f 75 6e 64 70 20 27 65 | (and (b|oundp 'e|
|00000120| 6d 61 63 73 2d 76 65 72 | 73 69 6f 6e 29 0a 09 20 |macs-ver|sion).. |
|00000130| 28 6f 72 20 28 61 6e 64 | 20 28 62 6f 75 6e 64 70 |(or (and| (boundp|
|00000140| 20 27 65 70 6f 63 68 3a | 3a 76 65 72 73 69 6f 6e | 'epoch:|:version|
|00000150| 29 20 65 70 6f 63 68 3a | 3a 76 65 72 73 69 6f 6e |) epoch:|:version|
|00000160| 29 0a 09 20 20 20 20 20 | 28 73 74 72 69 6e 67 2d |).. |(string-|
|00000170| 6c 65 73 73 70 20 65 6d | 61 63 73 2d 76 65 72 73 |lessp em|acs-vers|
|00000180| 69 6f 6e 20 22 31 39 22 | 29 29 29 0a 20 20 20 20 |ion "19"|))). |
|00000190| 28 65 72 72 6f 72 20 22 | 60 2f 67 64 2f 67 6e 75 |(error "|`/gd/gnu|
|000001a0| 2f 65 6d 61 63 73 2f 31 | 39 2e 30 2f 6c 69 73 70 |/emacs/1|9.0/lisp|
|000001b0| 2f 67 6f 6d 6f 6b 75 2e | 65 6c 27 20 77 61 73 20 |/gomoku.|el' was |
|000001c0| 63 6f 6d 70 69 6c 65 64 | 20 66 6f 72 20 45 6d 61 |compiled| for Ema|
|000001d0| 63 73 20 31 39 22 29 29 | 0a 0a 28 64 65 66 76 61 |cs 19"))|..(defva|
|000001e0| 72 20 67 6f 6d 6f 6b 75 | 2d 6d 6f 64 65 2d 68 6f |r gomoku|-mode-ho|
|000001f0| 6f 6b 20 6e 69 6c 20 22 | 5c 0a 49 66 20 6e 6f 6e |ok nil "|\.If non|
|00000200| 2d 6e 69 6c 2c 20 69 74 | 73 20 76 61 6c 75 65 20 |-nil, it|s value |
|00000210| 69 73 20 63 61 6c 6c 65 | 64 20 6f 6e 20 65 6e 74 |is calle|d on ent|
|00000220| 72 79 20 74 6f 20 47 6f | 6d 6f 6b 75 20 6d 6f 64 |ry to Go|moku mod|
|00000230| 65 2e 22 29 0a 28 64 65 | 66 76 61 72 20 67 6f 6d |e.").(de|fvar gom|
|00000240| 6f 6b 75 2d 6d 6f 64 65 | 2d 6d 61 70 20 6e 69 6c |oku-mode|-map nil|
|00000250| 20 22 5c 0a 4c 6f 63 61 | 6c 20 6b 65 79 6d 61 70 | "\.Loca|l keymap|
|00000260| 20 74 6f 20 75 73 65 20 | 69 6e 20 47 6f 6d 6f 6b | to use |in Gomok|
|00000270| 75 20 6d 6f 64 65 2e 22 | 29 0a 28 62 79 74 65 2d |u mode."|).(byte-|
|00000280| 63 6f 64 65 20 22 08 84 | 9d 00 c1 20 10 c2 08 c3 |code "..|... ....|
|00000290| c4 23 88 c2 08 c5 c6 23 | 88 c2 08 c7 c8 23 88 c2 |.#.....#|.....#..|
|000002a0| 08 c9 ca 23 88 c2 08 cb | cc 23 88 c2 08 cd ce 23 |...#....|.#.....#|
|000002b0| 88 c2 08 cf d0 23 88 c2 | 08 d1 d2 23 88 c2 08 d3 |.....#..|...#....|
|000002c0| d0 23 88 c2 08 d4 d2 23 | 88 c2 08 d5 ce 23 88 c2 |.#.....#|.....#..|
|000002d0| 08 d6 cc 23 88 c2 08 d7 | d8 23 88 c2 08 d9 d8 23 |...#....|.#.....#|
|000002e0| 88 c2 08 da d8 23 88 c2 | 08 db d8 23 88 c2 08 dc |.....#..|...#....|
|000002f0| dd 23 88 c2 08 de df 23 | 88 c2 08 e0 e1 23 88 c2 |.#.....#|.....#..|
|00000300| 08 e2 d2 23 88 c2 08 e3 | d0 23 88 c2 08 e4 cc 23 |...#....|.#.....#|
|00000310| 88 c2 08 e5 ce 23 88 c2 | 08 e6 d8 23 88 c2 08 e7 |.....#..|...#....|
|00000320| d8 23 88 c1 87 22 20 5b | 67 6f 6d 6f 6b 75 2d 6d |.#..." [|gomoku-m|
|00000330| 6f 64 65 2d 6d 61 70 20 | 6d 61 6b 65 2d 73 70 61 |ode-map |make-spa|
|00000340| 72 73 65 2d 6b 65 79 6d | 61 70 20 64 65 66 69 6e |rse-keym|ap defin|
|00000350| 65 2d 6b 65 79 20 22 79 | 22 20 67 6f 6d 6f 6b 75 |e-key "y|" gomoku|
|00000360| 2d 6d 6f 76 65 2d 6e 77 | 20 22 75 22 20 67 6f 6d |-move-nw| "u" gom|
|00000370| 6f 6b 75 2d 6d 6f 76 65 | 2d 6e 65 20 22 62 22 20 |oku-move|-ne "b" |
|00000380| 67 6f 6d 6f 6b 75 2d 6d | 6f 76 65 2d 73 77 20 22 |gomoku-m|ove-sw "|
|00000390| 6e 22 20 67 6f 6d 6f 6b | 75 2d 6d 6f 76 65 2d 73 |n" gomok|u-move-s|
|000003a0| 65 20 22 68 22 20 67 6f | 6d 6f 6b 75 2d 6d 6f 76 |e "h" go|moku-mov|
|000003b0| 65 2d 6c 65 66 74 20 22 | 6c 22 20 67 6f 6d 6f 6b |e-left "|l" gomok|
|000003c0| 75 2d 6d 6f 76 65 2d 72 | 69 67 68 74 20 22 6a 22 |u-move-r|ight "j"|
|000003d0| 20 67 6f 6d 6f 6b 75 2d | 6d 6f 76 65 2d 64 6f 77 | gomoku-|move-dow|
|000003e0| 6e 20 22 6b 22 20 67 6f | 6d 6f 6b 75 2d 6d 6f 76 |n "k" go|moku-mov|
|000003f0| 65 2d 75 70 20 22 0e 22 | 20 22 10 22 20 22 06 22 |e-up "."| "." "."|
|00000400| 20 22 02 22 20 22 58 22 | 20 67 6f 6d 6f 6b 75 2d | "." "X"| gomoku-|
|00000410| 68 75 6d 61 6e 2d 70 6c | 61 79 73 20 22 78 22 20 |human-pl|ays "x" |
|00000420| 22 0d 22 20 22 03 70 22 | 20 22 03 62 22 20 67 6f |"." ".p"| ".b" go|
|00000430| 6d 6f 6b 75 2d 68 75 6d | 61 6e 2d 74 61 6b 65 73 |moku-hum|an-takes|
|00000440| 2d 62 61 63 6b 20 22 03 | 72 22 20 67 6f 6d 6f 6b |-back ".|r" gomok|
|00000450| 75 2d 68 75 6d 61 6e 2d | 72 65 73 69 67 6e 73 20 |u-human-|resigns |
|00000460| 22 03 65 22 20 67 6f 6d | 6f 6b 75 2d 65 6d 61 63 |".e" gom|oku-emac|
|00000470| 73 2d 70 6c 61 79 73 20 | 5b 75 70 5d 20 5b 64 6f |s-plays |[up] [do|
|00000480| 77 6e 5d 20 5b 6c 65 66 | 74 5d 20 5b 72 69 67 68 |wn] [lef|t] [righ|
|00000490| 74 5d 20 5b 6b 70 2d 65 | 6e 74 65 72 5d 20 5b 69 |t] [kp-e|nter] [i|
|000004a0| 6e 73 65 72 74 5d 5d 20 | 34 29 0a 28 64 65 66 61 |nsert]] |4).(defa|
|000004b0| 6c 69 61 73 20 27 67 6f | 6d 6f 6b 75 2d 6d 6f 64 |lias 'go|moku-mod|
|000004c0| 65 20 23 5b 6e 69 6c 20 | 22 c0 11 c2 13 c4 20 88 |e #[nil |"..... .|
|000004d0| c5 0e 06 21 88 c7 c8 21 | 87 22 20 5b 67 6f 6d 6f |...!...!|." [gomo|
|000004e0| 6b 75 2d 6d 6f 64 65 20 | 6d 61 6a 6f 72 2d 6d 6f |ku-mode |major-mo|
|000004f0| 64 65 20 22 47 6f 6d 6f | 6b 75 22 20 6d 6f 64 65 |de "Gomo|ku" mode|
|00000500| 2d 6e 61 6d 65 20 67 6f | 6d 6f 6b 75 2d 64 69 73 |-name go|moku-dis|
|00000510| 70 6c 61 79 2d 73 74 61 | 74 69 73 74 69 63 73 20 |play-sta|tistics |
|00000520| 75 73 65 2d 6c 6f 63 61 | 6c 2d 6d 61 70 20 67 6f |use-loca|l-map go|
|00000530| 6d 6f 6b 75 2d 6d 6f 64 | 65 2d 6d 61 70 20 72 75 |moku-mod|e-map ru|
|00000540| 6e 2d 68 6f 6f 6b 73 20 | 67 6f 6d 6f 6b 75 2d 6d |n-hooks |gomoku-m|
|00000550| 6f 64 65 2d 68 6f 6f 6b | 5d 20 32 20 22 5c 0a 4d |ode-hook|] 2 "\.M|
|00000560| 61 6a 6f 72 20 6d 6f 64 | 65 20 66 6f 72 20 70 6c |ajor mod|e for pl|
|00000570| 61 79 69 6e 67 20 47 6f | 6d 6f 6b 75 20 61 67 61 |aying Go|moku aga|
|00000580| 69 6e 73 74 20 45 6d 61 | 63 73 2e 0a 59 6f 75 20 |inst Ema|cs..You |
|00000590| 61 6e 64 20 45 6d 61 63 | 73 20 70 6c 61 79 20 69 |and Emac|s play i|
|000005a0| 6e 20 74 75 72 6e 20 62 | 79 20 6d 61 72 6b 69 6e |n turn b|y markin|
|000005b0| 67 20 61 20 66 72 65 65 | 20 73 71 75 61 72 65 2e |g a free| square.|
|000005c0| 20 20 59 6f 75 20 6d 61 | 72 6b 20 69 74 20 77 69 | You ma|rk it wi|
|000005d0| 74 68 20 58 0a 61 6e 64 | 20 45 6d 61 63 73 20 6d |th X.and| Emacs m|
|000005e0| 61 72 6b 73 20 69 74 20 | 77 69 74 68 20 4f 2e 20 |arks it |with O. |
|000005f0| 20 54 68 65 20 77 69 6e | 6e 65 72 20 69 73 20 74 | The win|ner is t|
|00000600| 68 65 20 66 69 72 73 74 | 20 74 6f 20 67 65 74 20 |he first| to get |
|00000610| 66 69 76 65 20 63 6f 6e | 74 69 67 75 6f 75 73 0a |five con|tiguous.|
|00000620| 6d 61 72 6b 73 20 68 6f | 72 69 7a 6f 6e 74 61 6c |marks ho|rizontal|
|00000630| 6c 79 2c 20 76 65 72 74 | 69 63 61 6c 6c 79 20 6f |ly, vert|ically o|
|00000640| 72 20 69 6e 20 64 69 61 | 67 6f 6e 61 6c 2e 0a 0a |r in dia|gonal...|
|00000650| 59 6f 75 20 70 6c 61 79 | 20 62 79 20 6d 6f 76 69 |You play| by movi|
|00000660| 6e 67 20 74 68 65 20 63 | 75 72 73 6f 72 20 6f 76 |ng the c|ursor ov|
|00000670| 65 72 20 74 68 65 20 73 | 71 75 61 72 65 20 79 6f |er the s|quare yo|
|00000680| 75 20 63 68 6f 6f 73 65 | 20 61 6e 64 20 68 69 74 |u choose| and hit|
|00000690| 74 69 6e 67 20 5c 5c 5b | 67 6f 6d 6f 6b 75 2d 68 |ting \\[|gomoku-h|
|000006a0| 75 6d 61 6e 2d 70 6c 61 | 79 73 5d 2e 0a 0a 4f 74 |uman-pla|ys]...Ot|
|000006b0| 68 65 72 20 75 73 65 66 | 75 6c 20 63 6f 6d 6d 61 |her usef|ul comma|
|000006c0| 6e 64 73 3a 0a 5c 5c 7b | 67 6f 6d 6f 6b 75 2d 6d |nds:.\\{|gomoku-m|
|000006d0| 6f 64 65 2d 6d 61 70 7d | 0a 45 6e 74 72 79 20 74 |ode-map}|.Entry t|
|000006e0| 6f 20 74 68 69 73 20 6d | 6f 64 65 20 63 61 6c 6c |o this m|ode call|
|000006f0| 73 20 74 68 65 20 76 61 | 6c 75 65 20 6f 66 20 60 |s the va|lue of `|
|00000700| 67 6f 6d 6f 6b 75 2d 6d | 6f 64 65 2d 68 6f 6f 6b |gomoku-m|ode-hook|
|00000710| 27 20 69 66 20 74 68 61 | 74 20 76 61 6c 75 65 0a |' if tha|t value.|
|00000720| 69 73 20 6e 6f 6e 2d 6e | 69 6c 2e 22 20 6e 69 6c |is non-n|il." nil|
|00000730| 5d 29 0a 28 64 65 66 76 | 61 72 20 67 6f 6d 6f 6b |]).(defv|ar gomok|
|00000740| 75 2d 62 6f 61 72 64 2d | 77 69 64 74 68 20 6e 69 |u-board-|width ni|
|00000750| 6c 20 22 5c 0a 4e 75 6d | 62 65 72 20 6f 66 20 63 |l "\.Num|ber of c|
|00000760| 6f 6c 75 6d 6e 73 20 6f | 6e 20 74 68 65 20 47 6f |olumns o|n the Go|
|00000770| 6d 6f 6b 75 20 62 6f 61 | 72 64 2e 22 29 0a 28 64 |moku boa|rd.").(d|
|00000780| 65 66 76 61 72 20 67 6f | 6d 6f 6b 75 2d 62 6f 61 |efvar go|moku-boa|
|00000790| 72 64 2d 68 65 69 67 68 | 74 20 6e 69 6c 20 22 5c |rd-heigh|t nil "\|
|000007a0| 0a 4e 75 6d 62 65 72 20 | 6f 66 20 6c 69 6e 65 73 |.Number |of lines|
|000007b0| 20 6f 6e 20 74 68 65 20 | 47 6f 6d 6f 6b 75 20 62 | on the |Gomoku b|
|000007c0| 6f 61 72 64 2e 22 29 0a | 28 64 65 66 76 61 72 20 |oard.").|(defvar |
|000007d0| 67 6f 6d 6f 6b 75 2d 62 | 6f 61 72 64 20 6e 69 6c |gomoku-b|oard nil|
|000007e0| 20 22 5c 0a 56 65 63 74 | 6f 72 20 72 65 63 6f 72 | "\.Vect|or recor|
|000007f0| 64 69 6e 67 20 74 68 65 | 20 61 63 74 75 61 6c 20 |ding the| actual |
|00000800| 73 74 61 74 65 20 6f 66 | 20 74 68 65 20 47 6f 6d |state of| the Gom|
|00000810| 6f 6b 75 20 62 6f 61 72 | 64 2e 22 29 0a 28 64 65 |oku boar|d.").(de|
|00000820| 66 76 61 72 20 67 6f 6d | 6f 6b 75 2d 76 65 63 74 |fvar gom|oku-vect|
|00000830| 6f 72 2d 6c 65 6e 67 74 | 68 20 6e 69 6c 20 22 5c |or-lengt|h nil "\|
|00000840| 0a 4c 65 6e 67 74 68 20 | 6f 66 20 67 6f 6d 6f 6b |.Length |of gomok|
|00000850| 75 2d 62 6f 61 72 64 20 | 76 65 63 74 6f 72 2e 22 |u-board |vector."|
|00000860| 29 0a 28 64 65 66 76 61 | 72 20 67 6f 6d 6f 6b 75 |).(defva|r gomoku|
|00000870| 2d 64 72 61 77 2d 6c 69 | 6d 69 74 20 6e 69 6c 20 |-draw-li|mit nil |
|00000880| 22 5c 0a 41 66 74 65 72 | 20 68 6f 77 20 6d 61 6e |"\.After| how man|
|00000890| 79 20 6d 6f 76 65 73 20 | 77 69 6c 6c 20 45 6d 61 |y moves |will Ema|
|000008a0| 63 73 20 6f 66 66 65 72 | 20 61 20 64 72 61 77 3f |cs offer| a draw?|
|000008b0| 22 29 0a 28 64 65 66 61 | 6c 69 61 73 20 27 67 6f |").(defa|lias 'go|
|000008c0| 6d 6f 6b 75 2d 78 79 2d | 74 6f 2d 69 6e 64 65 78 |moku-xy-|to-index|
|000008d0| 20 23 5b 28 78 20 79 29 | 20 22 08 09 5f 5c 6e 08 | #[(x y)| ".._\n.|
|000008e0| 5c 5c 5c 5c 87 22 20 5b | 79 20 67 6f 6d 6f 6b 75 |\\\\." [|y gomoku|
|000008f0| 2d 62 6f 61 72 64 2d 77 | 69 64 74 68 20 78 5d 20 |-board-w|idth x] |
|00000900| 33 20 22 5c 0a 54 72 61 | 6e 73 6c 61 74 65 20 58 |3 "\.Tra|nslate X|
|00000910| 2c 20 59 20 63 61 72 74 | 65 73 69 61 6e 20 63 6f |, Y cart|esian co|
|00000920| 6f 72 64 73 20 69 6e 74 | 6f 20 74 68 65 20 63 6f |ords int|o the co|
|00000930| 72 72 65 73 70 6f 6e 64 | 69 6e 67 20 62 6f 61 72 |rrespond|ing boar|
|00000940| 64 20 69 6e 64 65 78 2e | 22 5d 29 0a 28 64 65 66 |d index.|"]).(def|
|00000950| 61 6c 69 61 73 20 27 67 | 6f 6d 6f 6b 75 2d 69 6e |alias 'g|omoku-in|
|00000960| 64 65 78 2d 74 6f 2d 78 | 20 23 5b 28 69 6e 64 65 |dex-to-x| #[(inde|
|00000970| 78 29 20 22 08 09 54 a6 | 87 22 20 5b 69 6e 64 65 |x) "..T.|." [inde|
|00000980| 78 20 67 6f 6d 6f 6b 75 | 2d 62 6f 61 72 64 2d 77 |x gomoku|-board-w|
|00000990| 69 64 74 68 5d 20 32 20 | 22 5c 0a 52 65 74 75 72 |idth] 2 |"\.Retur|
|000009a0| 6e 20 63 6f 72 72 65 73 | 70 6f 6e 64 69 6e 67 20 |n corres|ponding |
|000009b0| 78 2d 63 6f 6f 72 64 20 | 6f 66 20 62 6f 61 72 64 |x-coord |of board|
|000009c0| 20 49 4e 44 45 58 2e 22 | 5d 29 0a 28 64 65 66 61 | INDEX."|]).(defa|
|000009d0| 6c 69 61 73 20 27 67 6f | 6d 6f 6b 75 2d 69 6e 64 |lias 'go|moku-ind|
|000009e0| 65 78 2d 74 6f 2d 79 20 | 23 5b 28 69 6e 64 65 78 |ex-to-y |#[(index|
|000009f0| 29 20 22 08 09 54 a5 87 | 22 20 5b 69 6e 64 65 78 |) "..T..|" [index|
|00000a00| 20 67 6f 6d 6f 6b 75 2d | 62 6f 61 72 64 2d 77 69 | gomoku-|board-wi|
|00000a10| 64 74 68 5d 20 32 20 22 | 5c 0a 52 65 74 75 72 6e |dth] 2 "|\.Return|
|00000a20| 20 63 6f 72 72 65 73 70 | 6f 6e 64 69 6e 67 20 79 | corresp|onding y|
|00000a30| 2d 63 6f 6f 72 64 20 6f | 66 20 62 6f 61 72 64 20 |-coord o|f board |
|00000a40| 49 4e 44 45 58 2e 22 5d | 29 0a 28 64 65 66 61 6c |INDEX."]|).(defal|
|00000a50| 69 61 73 20 27 67 6f 6d | 6f 6b 75 2d 69 6e 69 74 |ias 'gom|oku-init|
|00000a60| 2d 62 6f 61 72 64 20 23 | 5b 6e 69 6c 20 22 c0 09 |-board #|[nil "..|
|00000a70| c2 5c 22 13 c2 09 53 1c | 1d 0d 0e 06 58 83 24 00 |.\"...S.|....X.$.|
|00000a80| 0b 0d c7 49 88 0b 5c 66 | c7 49 88 0d 54 15 5c 66 |...I..\f|.I..T.\f|
|00000a90| 53 14 82 5c 6e 00 2a c2 | 1d c2 09 57 85 3d 00 0b |S..\n.*.|...W.=..|
|00000aa0| 0d c7 49 88 0d 0e 06 c8 | 5c 5c 5c 5c 89 15 82 28 |..I.....|\\\\...(|
|00000ab0| 00 29 87 22 20 5b 6d 61 | 6b 65 2d 76 65 63 74 6f |.)." [ma|ke-vecto|
|00000ac0| 72 20 67 6f 6d 6f 6b 75 | 2d 76 65 63 74 6f 72 2d |r gomoku|-vector-|
|00000ad0| 6c 65 6e 67 74 68 20 30 | 20 67 6f 6d 6f 6b 75 2d |length 0| gomoku-|
|00000ae0| 62 6f 61 72 64 20 69 69 | 20 69 20 67 6f 6d 6f 6b |board ii| i gomok|
|00000af0| 75 2d 62 6f 61 72 64 2d | 77 69 64 74 68 20 2d 31 |u-board-|width -1|
|00000b00| 20 31 5d 20 34 20 22 5c | 0a 43 72 65 61 74 65 20 | 1] 4 "\|.Create |
|00000b10| 74 68 65 20 67 6f 6d 6f | 6b 75 2d 62 6f 61 72 64 |the gomo|ku-board|
|00000b20| 20 76 65 63 74 6f 72 20 | 61 6e 64 20 66 69 6c 6c | vector |and fill|
|00000b30| 20 69 74 20 77 69 74 68 | 20 69 6e 69 74 69 61 6c | it with| initial|
|00000b40| 20 76 61 6c 75 65 73 2e | 22 5d 29 0a 28 64 65 66 | values.|"]).(def|
|00000b50| 76 61 72 20 67 6f 6d 6f | 6b 75 2d 73 63 6f 72 65 |var gomo|ku-score|
|00000b60| 2d 74 61 62 6c 65 20 6e | 69 6c 20 22 5c 0a 56 65 |-table n|il "\.Ve|
|00000b70| 63 74 6f 72 20 72 65 63 | 6f 72 64 69 6e 67 20 74 |ctor rec|ording t|
|00000b80| 68 65 20 61 63 74 75 61 | 6c 20 73 63 6f 72 65 20 |he actua|l score |
|00000b90| 6f 66 20 74 68 65 20 66 | 72 65 65 20 73 71 75 61 |of the f|ree squa|
|00000ba0| 72 65 73 2e 22 29 0a 28 | 64 65 66 63 6f 6e 73 74 |res.").(|defconst|
|00000bb0| 20 6e 69 6c 2d 73 63 6f | 72 65 20 37 20 22 5c 0a | nil-sco|re 7 "\.|
|00000bc0| 53 63 6f 72 65 20 6f 66 | 20 61 6e 20 65 6d 70 74 |Score of| an empt|
|00000bd0| 79 20 71 74 75 70 6c 65 | 2e 22 29 0a 28 64 65 66 |y qtuple|.").(def|
|00000be0| 63 6f 6e 73 74 20 58 73 | 63 6f 72 65 20 31 35 20 |const Xs|core 15 |
|00000bf0| 22 5c 0a 53 63 6f 72 65 | 20 6f 66 20 61 20 71 74 |"\.Score| of a qt|
|00000c00| 75 70 6c 65 20 63 6f 6e | 74 61 69 6e 69 6e 67 20 |uple con|taining |
|00000c10| 6f 6e 65 20 58 2e 22 29 | 0a 28 64 65 66 63 6f 6e |one X.")|.(defcon|
|00000c20| 73 74 20 58 58 73 63 6f | 72 65 20 34 30 30 20 22 |st XXsco|re 400 "|
|00000c30| 5c 0a 53 63 6f 72 65 20 | 6f 66 20 61 20 71 74 75 |\.Score |of a qtu|
|00000c40| 70 6c 65 20 63 6f 6e 74 | 61 69 6e 69 6e 67 20 74 |ple cont|aining t|
|00000c50| 77 6f 20 58 27 73 2e 22 | 29 0a 28 64 65 66 63 6f |wo X's."|).(defco|
|00000c60| 6e 73 74 20 58 58 58 73 | 63 6f 72 65 20 31 38 30 |nst XXXs|core 180|
|00000c70| 30 20 22 5c 0a 53 63 6f | 72 65 20 6f 66 20 61 20 |0 "\.Sco|re of a |
|00000c80| 71 74 75 70 6c 65 20 63 | 6f 6e 74 61 69 6e 69 6e |qtuple c|ontainin|
|00000c90| 67 20 74 68 72 65 65 20 | 58 27 73 2e 22 29 0a 28 |g three |X's.").(|
|00000ca0| 64 65 66 63 6f 6e 73 74 | 20 58 58 58 58 73 63 6f |defconst| XXXXsco|
|00000cb0| 72 65 20 31 30 30 30 30 | 30 20 22 5c 0a 53 63 6f |re 10000|0 "\.Sco|
|00000cc0| 72 65 20 6f 66 20 61 20 | 71 74 75 70 6c 65 20 63 |re of a |qtuple c|
|00000cd0| 6f 6e 74 61 69 6e 69 6e | 67 20 66 6f 75 72 20 58 |ontainin|g four X|
|00000ce0| 27 73 2e 22 29 0a 28 64 | 65 66 63 6f 6e 73 74 20 |'s.").(d|efconst |
|00000cf0| 4f 73 63 6f 72 65 20 33 | 35 20 22 5c 0a 53 63 6f |Oscore 3|5 "\.Sco|
|00000d00| 72 65 20 6f 66 20 61 20 | 71 74 75 70 6c 65 20 63 |re of a |qtuple c|
|00000d10| 6f 6e 74 61 69 6e 69 6e | 67 20 6f 6e 65 20 4f 2e |ontainin|g one O.|
|00000d20| 22 29 0a 28 64 65 66 63 | 6f 6e 73 74 20 4f 4f 73 |").(defc|onst OOs|
|00000d30| 63 6f 72 65 20 38 30 30 | 20 22 5c 0a 53 63 6f 72 |core 800| "\.Scor|
|00000d40| 65 20 6f 66 20 61 20 71 | 74 75 70 6c 65 20 63 6f |e of a q|tuple co|
|00000d50| 6e 74 61 69 6e 69 6e 67 | 20 74 77 6f 20 4f 27 73 |ntaining| two O's|
|00000d60| 2e 22 29 0a 28 64 65 66 | 63 6f 6e 73 74 20 4f 4f |.").(def|const OO|
|00000d70| 4f 73 63 6f 72 65 20 31 | 35 30 30 30 20 22 5c 0a |Oscore 1|5000 "\.|
|00000d80| 53 63 6f 72 65 20 6f 66 | 20 61 20 71 74 75 70 6c |Score of| a qtupl|
|00000d90| 65 20 63 6f 6e 74 61 69 | 6e 69 6e 67 20 74 68 72 |e contai|ning thr|
|00000da0| 65 65 20 4f 27 73 2e 22 | 29 0a 28 64 65 66 63 6f |ee O's."|).(defco|
|00000db0| 6e 73 74 20 4f 4f 4f 4f | 73 63 6f 72 65 20 38 30 |nst OOOO|score 80|
|00000dc0| 30 30 30 30 20 22 5c 0a | 53 63 6f 72 65 20 6f 66 |0000 "\.|Score of|
|00000dd0| 20 61 20 71 74 75 70 6c | 65 20 63 6f 6e 74 61 69 | a qtupl|e contai|
|00000de0| 6e 69 6e 67 20 66 6f 75 | 72 20 4f 27 73 2e 22 29 |ning fou|r O's.")|
|00000df0| 0a 28 64 65 66 63 6f 6e | 73 74 20 67 6f 6d 6f 6b |.(defcon|st gomok|
|00000e00| 75 2d 73 63 6f 72 65 2d | 74 72 61 6e 73 2d 74 61 |u-score-|trans-ta|
|00000e10| 62 6c 65 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |ble (byt|e-code "|
|00000e20| c0 09 5c 6e 0b 5c 66 0d | c6 0e 07 c6 89 89 89 89 |..\n.\f.|........|
|00000e30| 0e 08 c6 89 89 89 89 0e | 09 c6 89 89 89 89 0e 5c |........|.......\|
|00000e40| 6e c6 89 89 89 89 89 26 | 1f 87 22 20 5b 76 65 63 |n......&|.." [vec|
|00000e50| 74 6f 72 20 6e 69 6c 2d | 73 63 6f 72 65 20 58 73 |tor nil-|score Xs|
|00000e60| 63 6f 72 65 20 58 58 73 | 63 6f 72 65 20 58 58 58 |core XXs|core XXX|
|00000e70| 73 63 6f 72 65 20 58 58 | 58 58 73 63 6f 72 65 20 |score XX|XXscore |
|00000e80| 30 20 4f 73 63 6f 72 65 | 20 4f 4f 73 63 6f 72 65 |0 Oscore| OOscore|
|00000e90| 20 4f 4f 4f 73 63 6f 72 | 65 20 4f 4f 4f 4f 73 63 | OOOscor|e OOOOsc|
|00000ea0| 6f 72 65 5d 20 33 32 29 | 20 22 5c 0a 56 65 63 74 |ore] 32)| "\.Vect|
|00000eb0| 6f 72 20 61 73 73 6f 63 | 69 61 74 69 6e 67 20 71 |or assoc|iating q|
|00000ec0| 74 75 70 6c 65 20 63 6f | 6e 74 65 6e 74 73 20 74 |tuple co|ntents t|
|00000ed0| 6f 20 74 68 65 69 72 20 | 73 63 6f 72 65 2e 22 29 |o their |score.")|
|00000ee0| 0a 28 64 65 66 63 6f 6e | 73 74 20 67 6f 6d 6f 6b |.(defcon|st gomok|
|00000ef0| 75 2d 77 69 6e 6e 69 6e | 67 2d 74 68 72 65 73 68 |u-winnin|g-thresh|
|00000f00| 6f 6c 64 20 4f 4f 4f 4f | 73 63 6f 72 65 20 22 5c |old OOOO|score "\|
|00000f10| 0a 54 68 72 65 73 68 6f | 6c 64 20 73 63 6f 72 65 |.Thresho|ld score|
|00000f20| 20 62 65 79 6f 6e 64 20 | 77 68 69 63 68 20 61 6e | beyond |which an|
|00000f30| 20 45 6d 61 63 73 20 6d | 6f 76 65 20 69 73 20 77 | Emacs m|ove is w|
|00000f40| 69 6e 6e 69 6e 67 2e 22 | 29 0a 28 64 65 66 63 6f |inning."|).(defco|
|00000f50| 6e 73 74 20 67 6f 6d 6f | 6b 75 2d 6c 6f 6f 73 69 |nst gomo|ku-loosi|
|00000f60| 6e 67 2d 74 68 72 65 73 | 68 6f 6c 64 20 58 58 58 |ng-thres|hold XXX|
|00000f70| 58 73 63 6f 72 65 20 22 | 5c 0a 54 68 72 65 73 68 |Xscore "|\.Thresh|
|00000f80| 6f 6c 64 20 73 63 6f 72 | 65 20 62 65 79 6f 6e 64 |old scor|e beyond|
|00000f90| 20 77 68 69 63 68 20 61 | 20 68 75 6d 61 6e 20 6d | which a| human m|
|00000fa0| 6f 76 65 20 69 73 20 77 | 69 6e 6e 69 6e 67 2e 22 |ove is w|inning."|
|00000fb0| 29 0a 28 64 65 66 61 6c | 69 61 73 20 27 67 6f 6d |).(defal|ias 'gom|
|00000fc0| 6f 6b 75 2d 73 74 72 6f | 6e 67 65 73 74 2d 73 71 |oku-stro|ngest-sq|
|00000fd0| 75 61 72 65 20 23 5b 6e | 69 6c 20 22 c0 89 c1 c2 |uare #[n|il "....|
|00000fe0| 89 5c 22 c1 0b 5c 66 5c | 22 c5 89 1e 06 1e 07 1e |.\"..\f\|".......|
|00000ff0| 08 1e 09 1e 5c 6e 1e 0b | 0e 09 0e 08 58 83 8d 00 |....\n..|....X...|
|00001000| 0e 5c 66 0e 09 48 0e 0b | 57 84 84 00 0e 5c 66 0e |.\f..H..|W....\f.|
|00001010| 09 48 89 16 06 0e 0b 56 | 83 5b 00 0e 0d 0e 09 48 |.H.....V|.[.....H|
|00001020| c0 55 83 51 00 c2 16 5c | 6e 0e 09 16 07 0e 06 16 |.U.Q...\|n.......|
|00001030| 0b 82 84 00 0e 5c 66 0e | 09 ce 49 88 82 84 00 0e |.....\f.|..I.....|
|00001040| 0d 0e 09 48 c0 55 84 6f | 00 0e 5c 66 0e 09 ce 49 |...H.U.o|..\f...I|
|00001050| 88 82 84 00 cf 0e 5c 6e | 54 89 16 5c 6e 21 c0 55 |......\n|T..\n!.U|
|00001060| 83 84 00 0e 09 16 07 0e | 06 16 0b 0e 09 54 89 16 |........|.....T..|
|00001070| 09 82 1a 00 0e 07 2e 06 | 87 22 20 5b 30 20 67 6f |........|." [0 go|
|00001080| 6d 6f 6b 75 2d 78 79 2d | 74 6f 2d 69 6e 64 65 78 |moku-xy-|to-index|
|00001090| 20 31 20 67 6f 6d 6f 6b | 75 2d 62 6f 61 72 64 2d | 1 gomok|u-board-|
|000010a0| 77 69 64 74 68 20 67 6f | 6d 6f 6b 75 2d 62 6f 61 |width go|moku-boa|
|000010b0| 72 64 2d 68 65 69 67 68 | 74 20 6e 69 6c 20 73 63 |rd-heigh|t nil sc|
|000010c0| 6f 72 65 20 62 65 73 74 | 2d 73 71 75 61 72 65 20 |ore best|-square |
|000010d0| 65 6e 64 20 73 71 75 61 | 72 65 20 63 6f 75 6e 74 |end squa|re count|
|000010e0| 20 73 63 6f 72 65 2d 6d | 61 78 20 67 6f 6d 6f 6b | score-m|ax gomok|
|000010f0| 75 2d 73 63 6f 72 65 2d | 74 61 62 6c 65 20 67 6f |u-score-|table go|
|00001100| 6d 6f 6b 75 2d 62 6f 61 | 72 64 20 2d 31 20 72 61 |moku-boa|rd -1 ra|
|00001110| 6e 64 6f 6d 5d 20 37 20 | 22 5c 0a 43 6f 6d 70 75 |ndom] 7 |"\.Compu|
|00001120| 74 65 20 69 6e 64 65 78 | 20 6f 66 20 66 72 65 65 |te index| of free|
|00001130| 20 73 71 75 61 72 65 20 | 77 69 74 68 20 68 69 67 | square |with hig|
|00001140| 68 65 73 74 20 73 63 6f | 72 65 2c 20 6f 72 20 6e |hest sco|re, or n|
|00001150| 69 6c 20 69 66 20 6e 6f | 6e 65 2e 22 5d 29 0a 28 |il if no|ne."]).(|
|00001160| 64 65 66 76 61 72 20 67 | 6f 6d 6f 6b 75 2d 73 61 |defvar g|omoku-sa|
|00001170| 76 65 64 2d 73 63 6f 72 | 65 2d 74 61 62 6c 65 20 |ved-scor|e-table |
|00001180| 6e 69 6c 20 22 5c 0a 52 | 65 63 6f 72 64 65 64 20 |nil "\.R|ecorded |
|00001190| 69 6e 69 74 69 61 6c 20 | 76 61 6c 75 65 20 6f 66 |initial |value of|
|000011a0| 20 70 72 65 76 69 6f 75 | 73 20 73 63 6f 72 65 20 | previou|s score |
|000011b0| 74 61 62 6c 65 2e 22 29 | 0a 28 64 65 66 76 61 72 |table.")|.(defvar|
|000011c0| 20 67 6f 6d 6f 6b 75 2d | 73 61 76 65 64 2d 62 6f | gomoku-|saved-bo|
|000011d0| 61 72 64 2d 77 69 64 74 | 68 20 6e 69 6c 20 22 5c |ard-widt|h nil "\|
|000011e0| 0a 52 65 63 6f 72 64 65 | 64 20 76 61 6c 75 65 20 |.Recorde|d value |
|000011f0| 6f 66 20 70 72 65 76 69 | 6f 75 73 20 62 6f 61 72 |of previ|ous boar|
|00001200| 64 20 77 69 64 74 68 2e | 22 29 0a 28 64 65 66 76 |d width.|").(defv|
|00001210| 61 72 20 67 6f 6d 6f 6b | 75 2d 73 61 76 65 64 2d |ar gomok|u-saved-|
|00001220| 62 6f 61 72 64 2d 68 65 | 69 67 68 74 20 6e 69 6c |board-he|ight nil|
|00001230| 20 22 5c 0a 52 65 63 6f | 72 64 65 64 20 76 61 6c | "\.Reco|rded val|
|00001240| 75 65 20 6f 66 20 70 72 | 65 76 69 6f 75 73 20 62 |ue of pr|evious b|
|00001250| 6f 61 72 64 20 68 65 69 | 67 68 74 2e 22 29 0a 28 |oard hei|ght.").(|
|00001260| 64 65 66 61 6c 69 61 73 | 20 27 67 6f 6d 6f 6b 75 |defalias| 'gomoku|
|00001270| 2d 69 6e 69 74 2d 73 63 | 6f 72 65 2d 74 61 62 6c |-init-sc|ore-tabl|
|00001280| 65 20 23 5b 6e 69 6c 20 | 22 08 83 17 00 09 5c 6e |e #[nil |".....\n|
|00001290| 55 83 17 00 0b 5c 66 55 | 83 17 00 c5 08 21 89 16 |U....\fU|.....!..|
|000012a0| 06 87 c7 0e 08 0e 09 ca | 5f 5c 22 16 06 cb 89 89 |........|_\".....|
|000012b0| 89 89 89 1e 5c 66 1e 0d | 1e 0e 1e 0f 1e 10 1e 11 |....\f..|........|
|000012c0| 09 54 d2 a5 16 0f 0b 54 | d2 a5 16 0e d3 0e 0f 5e |.T.....T|.......^|
|000012d0| 16 0d d3 0e 0e 5e 16 5c | 66 d4 16 11 d4 0e 0d 58 |.....^.\|f......X|
|000012e0| 83 78 00 d4 16 10 d4 0e | 0e 58 83 6f 00 d5 0e 11 |.x......|.X.o....|
|000012f0| 0e 10 5c 22 88 0e 10 54 | 89 16 10 82 59 00 0e 11 |..\"...T|....Y...|
|00001300| 54 89 16 11 82 4f 00 0e | 11 0e 0f 58 83 a3 00 d4 |T....O..|...X....|
|00001310| 16 10 d4 0e 5c 66 58 83 | 9a 00 d5 0e 11 0e 10 5c |....\fX.|.......\|
|00001320| 22 88 0e 10 54 89 16 10 | 82 84 00 0e 11 54 89 16 |"...T...|.....T..|
|00001330| 11 82 7a 00 2e 06 c5 0e | 06 21 10 09 12 0b 89 14 |..z.....|.!......|
|00001340| 87 22 20 5b 67 6f 6d 6f | 6b 75 2d 73 61 76 65 64 |." [gomo|ku-saved|
|00001350| 2d 73 63 6f 72 65 2d 74 | 61 62 6c 65 20 67 6f 6d |-score-t|able gom|
|00001360| 6f 6b 75 2d 62 6f 61 72 | 64 2d 77 69 64 74 68 20 |oku-boar|d-width |
|00001370| 67 6f 6d 6f 6b 75 2d 73 | 61 76 65 64 2d 62 6f 61 |gomoku-s|aved-boa|
|00001380| 72 64 2d 77 69 64 74 68 | 20 67 6f 6d 6f 6b 75 2d |rd-width| gomoku-|
|00001390| 62 6f 61 72 64 2d 68 65 | 69 67 68 74 20 67 6f 6d |board-he|ight gom|
|000013a0| 6f 6b 75 2d 73 61 76 65 | 64 2d 62 6f 61 72 64 2d |oku-save|d-board-|
|000013b0| 68 65 69 67 68 74 20 63 | 6f 70 79 2d 73 65 71 75 |height c|opy-sequ|
|000013c0| 65 6e 63 65 20 67 6f 6d | 6f 6b 75 2d 73 63 6f 72 |ence gom|oku-scor|
|000013d0| 65 2d 74 61 62 6c 65 20 | 6d 61 6b 65 2d 76 65 63 |e-table |make-vec|
|000013e0| 74 6f 72 20 67 6f 6d 6f | 6b 75 2d 76 65 63 74 6f |tor gomo|ku-vecto|
|000013f0| 72 2d 6c 65 6e 67 74 68 | 20 6e 69 6c 2d 73 63 6f |r-length| nil-sco|
|00001400| 72 65 20 32 30 20 6e 69 | 6c 20 6d 61 78 6a 32 20 |re 20 ni|l maxj2 |
|00001410| 6d 61 78 69 32 20 6d 61 | 78 6a 20 6d 61 78 69 20 |maxi2 ma|xj maxi |
|00001420| 6a 20 69 20 32 20 34 20 | 31 20 67 6f 6d 6f 6b 75 |j i 2 4 |1 gomoku|
|00001430| 2d 69 6e 69 74 2d 73 71 | 75 61 72 65 2d 73 63 6f |-init-sq|uare-sco|
|00001440| 72 65 5d 20 37 20 22 5c | 0a 43 72 65 61 74 65 20 |re] 7 "\|.Create |
|00001450| 74 68 65 20 73 63 6f 72 | 65 20 74 61 62 6c 65 20 |the scor|e table |
|00001460| 76 65 63 74 6f 72 20 61 | 6e 64 20 66 69 6c 6c 20 |vector a|nd fill |
|00001470| 69 74 20 77 69 74 68 20 | 69 6e 69 74 69 61 6c 20 |it with |initial |
|00001480| 76 61 6c 75 65 73 2e 22 | 5d 29 0a 28 64 65 66 61 |values."|]).(defa|
|00001490| 6c 69 61 73 20 27 67 6f | 6d 6f 6b 75 2d 6e 62 2d |lias 'go|moku-nb-|
|000014a0| 71 74 75 70 6c 65 73 20 | 23 5b 28 69 20 6a 29 20 |qtuples |#[(i j) |
|000014b0| 22 c0 09 53 5e c0 5c 6e | 09 5a 5e c0 0b 53 5e c0 |"..S^.\n|.Z^..S^.|
|000014c0| 5c 66 0b 5a 5e 1d 1e 06 | 1e 07 89 1e 08 0e 07 5c |\f.Z^...|.......\|
|000014d0| 5c c9 5d ca 5e 0e 06 0d | 5c 5c c9 5d ca 5e 0e 08 |\.].^...|\\.].^..|
|000014e0| 0e 06 5e 0e 07 0d 5e 5c | 5c c9 5d ca 5e 0e 07 0e |..^...^\|\.].^...|
|000014f0| 06 5e 0e 08 0d 5e 5c 5c | c9 5d ca 5e cb 5c 5c 5c |.^...^\\|.].^.\\\|
|00001500| 5c 5c 5c 5c 5c 2c 87 22 | 20 5b 34 20 69 20 67 6f |\\\\\,."| [4 i go|
|00001510| 6d 6f 6b 75 2d 62 6f 61 | 72 64 2d 77 69 64 74 68 |moku-boa|rd-width|
|00001520| 20 6a 20 67 6f 6d 6f 6b | 75 2d 62 6f 61 72 64 2d | j gomok|u-board-|
|00001530| 68 65 69 67 68 74 20 64 | 6f 77 6e 20 75 70 20 72 |height d|own up r|
|00001540| 69 67 68 74 20 6c 65 66 | 74 20 33 20 38 20 2d 31 |ight lef|t 3 8 -1|
|00001550| 32 5d 20 37 20 22 5c 0a | 52 65 74 75 72 6e 20 74 |2] 7 "\.|Return t|
|00001560| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 71 74 75 |he numbe|r of qtu|
|00001570| 70 6c 65 73 20 63 6f 6e | 74 61 69 6e 69 6e 67 20 |ples con|taining |
|00001580| 73 71 75 61 72 65 20 49 | 2c 4a 2e 22 5d 29 0a 28 |square I|,J."]).(|
|00001590| 64 65 66 61 6c 69 61 73 | 20 27 67 6f 6d 6f 6b 75 |defalias| 'gomoku|
|000015a0| 2d 69 6e 69 74 2d 73 71 | 75 61 72 65 2d 73 63 6f |-init-sq|uare-sco|
|000015b0| 72 65 20 23 5b 28 69 20 | 6a 29 20 22 08 09 5a 54 |re #[(i |j) "..ZT|
|000015c0| 5c 6e 0b 5a 54 c4 09 0b | 5c 22 0d c6 48 5f 1e 07 |\n.ZT...|\"..H_..|
|000015d0| 1e 08 1e 09 0e 5c 6e cb | 09 0b 5c 22 0e 07 49 88 |.....\n.|..\"..I.|
|000015e0| 0e 5c 6e cb 0e 09 0b 5c | 22 0e 07 49 88 0e 5c 6e |.\n....\|"..I..\n|
|000015f0| cb 09 0e 08 5c 22 0e 07 | 49 88 0e 5c 6e cb 0e 09 |....\"..|I..\n...|
|00001600| 0e 08 5c 22 0e 07 49 2b | 87 22 20 5b 67 6f 6d 6f |..\"..I+|." [gomo|
|00001610| 6b 75 2d 62 6f 61 72 64 | 2d 77 69 64 74 68 20 69 |ku-board|-width i|
|00001620| 20 67 6f 6d 6f 6b 75 2d | 62 6f 61 72 64 2d 68 65 | gomoku-|board-he|
|00001630| 69 67 68 74 20 6a 20 67 | 6f 6d 6f 6b 75 2d 6e 62 |ight j g|omoku-nb|
|00001640| 2d 71 74 75 70 6c 65 73 | 20 67 6f 6d 6f 6b 75 2d |-qtuples| gomoku-|
|00001650| 73 63 6f 72 65 2d 74 72 | 61 6e 73 2d 74 61 62 6c |score-tr|ans-tabl|
|00001660| 65 20 30 20 73 63 20 6a | 6a 20 69 69 20 67 6f 6d |e 0 sc j|j ii gom|
|00001670| 6f 6b 75 2d 73 63 6f 72 | 65 2d 74 61 62 6c 65 20 |oku-scor|e-table |
|00001680| 67 6f 6d 6f 6b 75 2d 78 | 79 2d 74 6f 2d 69 6e 64 |gomoku-x|y-to-ind|
|00001690| 65 78 5d 20 35 20 22 5c | 0a 47 69 76 65 20 69 6e |ex] 5 "\|.Give in|
|000016a0| 69 74 69 61 6c 20 73 63 | 6f 72 65 20 74 6f 20 73 |itial sc|ore to s|
|000016b0| 71 75 61 72 65 20 49 2c | 4a 20 61 6e 64 20 74 6f |quare I,|J and to|
|000016c0| 20 69 74 73 20 6d 69 72 | 72 6f 72 20 69 6d 61 67 | its mir|ror imag|
|000016d0| 65 73 2e 22 5d 29 0a 28 | 64 65 66 61 6c 69 61 73 |es."]).(|defalias|
|000016e0| 20 27 67 6f 6d 6f 6b 75 | 2d 75 70 64 61 74 65 2d | 'gomoku|-update-|
|000016f0| 73 63 6f 72 65 2d 74 61 | 62 6c 65 20 23 5b 28 73 |score-ta|ble #[(s|
|00001700| 71 75 61 72 65 20 64 76 | 61 6c 29 20 22 c0 09 21 |quare dv|al) "..!|
|00001710| 1a c3 09 21 1c c5 c6 5c | 6e 5a 5d 1e 07 c5 c6 5c |...!...\|nZ]....\|
|00001720| 66 5a 5d 1e 08 c9 0e 5c | 6e 5c 6e 5a cb 5a 5e 1e |fZ]....\|n\nZ.Z^.|
|00001730| 5c 66 c9 0e 0d 5c 66 5a | cb 5a 5e 1e 0e cf 0e 07 |\f...\fZ|.Z^.....|
|00001740| 0e 5c 66 09 c6 c9 0e 10 | 26 06 88 cf 0e 08 0e 0e |.\f.....|&.......|
|00001750| 09 c9 c6 0e 10 26 06 88 | cf 0e 07 0e 08 5d 0e 5c |.....&..|.....].\|
|00001760| 66 0e 0e 5e 09 c6 89 0e | 10 26 06 88 cf c6 5c 66 |f..^....|.&....\f|
|00001770| 5a c5 5c 6e 0e 5c 6e 5a | 5d 5d c9 5c 6e d1 5a 0e |Z.\n.\nZ|]].\n.Z.|
|00001780| 0d 5c 66 5a cb 5a 5e 5e | 09 d2 c6 0e 10 26 06 2e |.\fZ.Z^^|.....&..|
|00001790| 06 87 22 20 5b 67 6f 6d | 6f 6b 75 2d 69 6e 64 65 |.." [gom|oku-inde|
|000017a0| 78 2d 74 6f 2d 78 20 73 | 71 75 61 72 65 20 78 20 |x-to-x s|quare x |
|000017b0| 67 6f 6d 6f 6b 75 2d 69 | 6e 64 65 78 2d 74 6f 2d |gomoku-i|ndex-to-|
|000017c0| 79 20 79 20 2d 34 20 31 | 20 69 6d 69 6e 20 6a 6d |y y -4 1| imin jm|
|000017d0| 69 6e 20 30 20 67 6f 6d | 6f 6b 75 2d 62 6f 61 72 |in 0 gom|oku-boar|
|000017e0| 64 2d 77 69 64 74 68 20 | 34 20 69 6d 61 78 20 67 |d-width |4 imax g|
|000017f0| 6f 6d 6f 6b 75 2d 62 6f | 61 72 64 2d 68 65 69 67 |omoku-bo|ard-heig|
|00001800| 68 74 20 6a 6d 61 78 20 | 67 6f 6d 6f 6b 75 2d 75 |ht jmax |gomoku-u|
|00001810| 70 64 61 74 65 2d 73 63 | 6f 72 65 2d 69 6e 2d 64 |pdate-sc|ore-in-d|
|00001820| 69 72 65 63 74 69 6f 6e | 20 64 76 61 6c 20 35 20 |irection| dval 5 |
|00001830| 2d 31 5d 20 37 20 22 5c | 0a 55 70 64 61 74 65 20 |-1] 7 "\|.Update |
|00001840| 73 63 6f 72 65 20 74 61 | 62 6c 65 20 61 66 74 65 |score ta|ble afte|
|00001850| 72 20 53 51 55 41 52 45 | 20 72 65 63 65 69 76 65 |r SQUARE| receive|
|00001860| 64 20 61 20 44 56 41 4c | 20 69 6e 63 72 65 6d 65 |d a DVAL| increme|
|00001870| 6e 74 2e 22 5d 29 0a 28 | 64 65 66 61 6c 69 61 73 |nt."]).(|defalias|
|00001880| 20 27 67 6f 6d 6f 6b 75 | 2d 75 70 64 61 74 65 2d | 'gomoku|-update-|
|00001890| 73 63 6f 72 65 2d 69 6e | 2d 64 69 72 65 63 74 69 |score-in|-directi|
|000018a0| 6f 6e 20 23 5b 28 6c 65 | 66 74 20 72 69 67 68 74 |on #[(le|ft right|
|000018b0| 20 73 71 75 61 72 65 20 | 64 78 20 64 79 20 64 76 | square |dx dy dv|
|000018c0| 61 6c 29 20 22 08 09 56 | 86 be 00 c2 89 89 89 89 |al) "..V|........|
|000018d0| 89 1b 1c 1d 1e 06 1e 07 | 1e 08 c9 0e 5c 6e 0e 0b |........|....\n..|
|000018e0| 5c 22 16 08 0e 5c 66 08 | 0e 08 5f 5c 5c 16 07 0e |\"...\f.|.._\\...|
|000018f0| 5c 66 09 0e 08 5f 5c 5c | 16 06 0e 07 0e 08 cd 5f |\f..._\\|......._|
|00001900| 5c 5c 15 0e 07 16 5c 66 | ce 14 0e 5c 66 0d 58 83 |\\....\f|...\f.X.|
|00001910| 57 00 5c 66 0e 0f 0e 5c | 66 48 5c 5c 14 0e 5c 66 |W.\f...\|fH\\..\f|
|00001920| 0e 08 5c 5c 89 16 5c 66 | 82 3f 00 0e 07 0e 06 58 |..\\..\f|.?.....X|
|00001930| 85 bc 00 0e 10 5c 66 48 | 0e 10 5c 66 0e 11 5a 48 |.....\fH|..\f..ZH|
|00001940| 5a 89 13 ce 55 84 9e 00 | 0e 07 89 16 5c 66 0d 58 |Z...U...|....\f.X|
|00001950| 83 9e 00 0e 0f 0e 5c 66 | 48 ce 55 83 93 00 0e 12 |......\f|H.U.....|
|00001960| 0e 5c 66 0e 12 0e 5c 66 | 48 0b 5c 5c 49 88 0e 5c |.\f...\f|H.\\I..\|
|00001970| 66 0e 08 5c 5c 89 16 5c | 66 82 77 00 0d 0e 08 5c |f..\\..\|f.w....\|
|00001980| 5c 15 5c 66 0e 0f 0e 07 | 48 5b 0e 0f 0d 48 5c 5c |\.\f....|H[...H\\|
|00001990| 5c 5c 14 0e 07 0e 08 5c | 5c 89 16 07 82 59 00 2e |\\.....\|\....Y..|
|000019a0| 06 87 22 20 5b 6c 65 66 | 74 20 72 69 67 68 74 20 |.." [lef|t right |
|000019b0| 6e 69 6c 20 64 65 6c 74 | 61 20 63 6f 75 6e 74 20 |nil delt|a count |
|000019c0| 73 71 75 61 72 65 32 20 | 73 71 75 61 72 65 31 20 |square2 |square1 |
|000019d0| 73 71 75 61 72 65 30 20 | 64 65 70 6c 20 67 6f 6d |square0 |depl gom|
|000019e0| 6f 6b 75 2d 78 79 2d 74 | 6f 2d 69 6e 64 65 78 20 |oku-xy-t|o-index |
|000019f0| 64 78 20 64 79 20 73 71 | 75 61 72 65 20 34 20 30 |dx dy sq|uare 4 0|
|00001a00| 20 67 6f 6d 6f 6b 75 2d | 62 6f 61 72 64 20 67 6f | gomoku-|board go|
|00001a10| 6d 6f 6b 75 2d 73 63 6f | 72 65 2d 74 72 61 6e 73 |moku-sco|re-trans|
|00001a20| 2d 74 61 62 6c 65 20 64 | 76 61 6c 20 67 6f 6d 6f |-table d|val gomo|
|00001a30| 6b 75 2d 73 63 6f 72 65 | 2d 74 61 62 6c 65 5d 20 |ku-score|-table] |
|00001a40| 37 20 22 5c 0a 55 70 64 | 61 74 65 20 73 63 6f 72 |7 "\.Upd|ate scor|
|00001a50| 65 73 20 66 6f 72 20 61 | 6c 6c 20 73 71 75 61 72 |es for a|ll squar|
|00001a60| 65 73 20 69 6e 20 74 68 | 65 20 71 74 75 70 6c 65 |es in th|e qtuple|
|00001a70| 73 20 73 74 61 72 74 69 | 6e 67 20 62 65 74 77 65 |s starti|ng betwe|
|00001a80| 65 6e 20 74 68 65 20 4c | 45 46 54 74 68 0a 73 71 |en the L|EFTth.sq|
|00001a90| 75 61 72 65 20 61 6e 64 | 20 74 68 65 20 52 49 47 |uare and| the RIG|
|00001aa0| 48 54 74 68 20 61 66 74 | 65 72 20 53 51 55 41 52 |HTth aft|er SQUAR|
|00001ab0| 45 2c 20 61 6c 6f 6e 67 | 20 74 68 65 20 44 58 2c |E, along| the DX,|
|00001ac0| 20 44 59 20 64 69 72 65 | 63 74 69 6f 6e 2c 20 63 | DY dire|ction, c|
|00001ad0| 6f 6e 73 69 64 65 72 69 | 6e 67 0a 74 68 61 74 20 |onsideri|ng.that |
|00001ae0| 44 56 41 4c 20 68 61 73 | 20 62 65 65 6e 20 61 64 |DVAL has| been ad|
|00001af0| 64 65 64 20 6f 6e 20 53 | 51 55 41 52 45 2e 22 5d |ded on S|QUARE."]|
|00001b00| 29 0a 28 64 65 66 76 61 | 72 20 67 6f 6d 6f 6b 75 |).(defva|r gomoku|
|00001b10| 2d 67 61 6d 65 2d 69 6e | 2d 70 72 6f 67 72 65 73 |-game-in|-progres|
|00001b20| 73 20 6e 69 6c 20 22 5c | 0a 4e 6f 6e 2d 6e 69 6c |s nil "\|.Non-nil|
|00001b30| 20 69 66 20 61 20 67 61 | 6d 65 20 69 73 20 69 6e | if a ga|me is in|
|00001b40| 20 70 72 6f 67 72 65 73 | 73 2e 22 29 0a 28 64 65 | progres|s.").(de|
|00001b50| 66 76 61 72 20 67 6f 6d | 6f 6b 75 2d 67 61 6d 65 |fvar gom|oku-game|
|00001b60| 2d 68 69 73 74 6f 72 79 | 20 6e 69 6c 20 22 5c 0a |-history| nil "\.|
|00001b70| 41 20 72 65 63 6f 72 64 | 20 6f 66 20 61 6c 6c 20 |A record| of all |
|00001b80| 6d 6f 76 65 73 20 74 68 | 61 74 20 68 61 76 65 20 |moves th|at have |
|00001b90| 62 65 65 6e 20 70 6c 61 | 79 65 64 20 64 75 72 69 |been pla|yed duri|
|00001ba0| 6e 67 20 63 75 72 72 65 | 6e 74 20 67 61 6d 65 2e |ng curre|nt game.|
|00001bb0| 22 29 0a 28 64 65 66 76 | 61 72 20 67 6f 6d 6f 6b |").(defv|ar gomok|
|00001bc0| 75 2d 6e 75 6d 62 65 72 | 2d 6f 66 2d 6d 6f 76 65 |u-number|-of-move|
|00001bd0| 73 20 6e 69 6c 20 22 5c | 0a 4e 75 6d 62 65 72 20 |s nil "\|.Number |
|00001be0| 6f 66 20 6d 6f 76 65 73 | 20 61 6c 72 65 61 64 79 |of moves| already|
|00001bf0| 20 70 6c 61 79 65 64 20 | 69 6e 20 63 75 72 72 65 | played |in curre|
|00001c00| 6e 74 20 67 61 6d 65 2e | 22 29 0a 28 64 65 66 76 |nt game.|").(defv|
|00001c10| 61 72 20 67 6f 6d 6f 6b | 75 2d 6e 75 6d 62 65 72 |ar gomok|u-number|
|00001c20| 2d 6f 66 2d 68 75 6d 61 | 6e 2d 6d 6f 76 65 73 20 |-of-huma|n-moves |
|00001c30| 6e 69 6c 20 22 5c 0a 4e | 75 6d 62 65 72 20 6f 66 |nil "\.N|umber of|
|00001c40| 20 6d 6f 76 65 73 20 61 | 6c 72 65 61 64 79 20 70 | moves a|lready p|
|00001c50| 6c 61 79 65 64 20 62 79 | 20 68 75 6d 61 6e 20 69 |layed by| human i|
|00001c60| 6e 20 63 75 72 72 65 6e | 74 20 67 61 6d 65 2e 22 |n curren|t game."|
|00001c70| 29 0a 28 64 65 66 76 61 | 72 20 67 6f 6d 6f 6b 75 |).(defva|r gomoku|
|00001c80| 2d 65 6d 61 63 73 2d 70 | 6c 61 79 65 64 2d 66 69 |-emacs-p|layed-fi|
|00001c90| 72 73 74 20 6e 69 6c 20 | 22 5c 0a 4e 6f 6e 2d 6e |rst nil |"\.Non-n|
|00001ca0| 69 6c 20 69 66 20 45 6d | 61 63 73 20 70 6c 61 79 |il if Em|acs play|
|00001cb0| 65 64 20 66 69 72 73 74 | 2e 22 29 0a 28 64 65 66 |ed first|.").(def|
|00001cc0| 76 61 72 20 67 6f 6d 6f | 6b 75 2d 68 75 6d 61 6e |var gomo|ku-human|
|00001cd0| 2d 74 6f 6f 6b 2d 62 61 | 63 6b 20 6e 69 6c 20 22 |-took-ba|ck nil "|
|00001ce0| 5c 0a 4e 6f 6e 2d 6e 69 | 6c 20 69 66 20 48 75 6d |\.Non-ni|l if Hum|
|00001cf0| 61 6e 20 74 6f 6f 6b 20 | 62 61 63 6b 20 61 20 6d |an took |back a m|
|00001d00| 6f 76 65 20 64 75 72 69 | 6e 67 20 74 68 65 20 67 |ove duri|ng the g|
|00001d10| 61 6d 65 2e 22 29 0a 28 | 64 65 66 76 61 72 20 67 |ame.").(|defvar g|
|00001d20| 6f 6d 6f 6b 75 2d 68 75 | 6d 61 6e 2d 72 65 66 75 |omoku-hu|man-refu|
|00001d30| 73 65 64 2d 64 72 61 77 | 20 6e 69 6c 20 22 5c 0a |sed-draw| nil "\.|
|00001d40| 4e 6f 6e 2d 6e 69 6c 20 | 69 66 20 48 75 6d 61 6e |Non-nil |if Human|
|00001d50| 20 72 65 66 75 73 65 64 | 20 45 6d 61 63 73 20 6f | refused| Emacs o|
|00001d60| 66 66 65 72 20 6f 66 20 | 61 20 64 72 61 77 2e 22 |ffer of |a draw."|
|00001d70| 29 0a 28 64 65 66 76 61 | 72 20 67 6f 6d 6f 6b 75 |).(defva|r gomoku|
|00001d80| 2d 65 6d 61 63 73 2d 69 | 73 2d 63 6f 6d 70 75 74 |-emacs-i|s-comput|
|00001d90| 69 6e 67 20 6e 69 6c 20 | 22 5c 0a 4e 6f 6e 2d 6e |ing nil |"\.Non-n|
|00001da0| 69 6c 20 69 66 20 45 6d | 61 63 73 20 69 73 20 69 |il if Em|acs is i|
|00001db0| 6e 20 74 68 65 20 6d 69 | 64 64 6c 65 20 6f 66 20 |n the mi|ddle of |
|00001dc0| 61 20 63 6f 6d 70 75 74 | 61 74 69 6f 6e 2e 22 29 |a comput|ation.")|
|00001dd0| 0a 28 64 65 66 61 6c 69 | 61 73 20 27 67 6f 6d 6f |.(defali|as 'gomo|
|00001de0| 6b 75 2d 73 74 61 72 74 | 2d 67 61 6d 65 20 23 5b |ku-start|-game #[|
|00001df0| 28 6e 20 6d 29 20 22 c0 | 11 c0 12 0b 14 0d 16 06 |(n m) ".|........|
|00001e00| 0d c7 5c 5c 0b 54 5f 54 | 16 08 0b 0d c9 5f 5f ca |..\\.T_T|.....__.|
|00001e10| a5 16 0b cc 16 0d ce 16 | 0f ce 16 10 cc 16 11 cc |........|........|
|00001e20| 16 12 cc 16 13 d4 0b 0d | 5c 22 88 d5 20 88 d6 20 |........|\".. .. |
|00001e30| 88 cc 89 11 87 22 20 5b | 74 20 67 6f 6d 6f 6b 75 |....." [|t gomoku|
|00001e40| 2d 65 6d 61 63 73 2d 69 | 73 2d 63 6f 6d 70 75 74 |-emacs-i|s-comput|
|00001e50| 69 6e 67 20 67 6f 6d 6f | 6b 75 2d 67 61 6d 65 2d |ing gomo|ku-game-|
|00001e60| 69 6e 2d 70 72 6f 67 72 | 65 73 73 20 6e 20 67 6f |in-progr|ess n go|
|00001e70| 6d 6f 6b 75 2d 62 6f 61 | 72 64 2d 77 69 64 74 68 |moku-boa|rd-width|
|00001e80| 20 6d 20 67 6f 6d 6f 6b | 75 2d 62 6f 61 72 64 2d | m gomok|u-board-|
|00001e90| 68 65 69 67 68 74 20 32 | 20 67 6f 6d 6f 6b 75 2d |height 2| gomoku-|
|00001ea0| 76 65 63 74 6f 72 2d 6c | 65 6e 67 74 68 20 37 20 |vector-l|ength 7 |
|00001eb0| 31 30 20 67 6f 6d 6f 6b | 75 2d 64 72 61 77 2d 6c |10 gomok|u-draw-l|
|00001ec0| 69 6d 69 74 20 6e 69 6c | 20 67 6f 6d 6f 6b 75 2d |imit nil| gomoku-|
|00001ed0| 67 61 6d 65 2d 68 69 73 | 74 6f 72 79 20 30 20 67 |game-his|tory 0 g|
|00001ee0| 6f 6d 6f 6b 75 2d 6e 75 | 6d 62 65 72 2d 6f 66 2d |omoku-nu|mber-of-|
|00001ef0| 6d 6f 76 65 73 20 67 6f | 6d 6f 6b 75 2d 6e 75 6d |moves go|moku-num|
|00001f00| 62 65 72 2d 6f 66 2d 68 | 75 6d 61 6e 2d 6d 6f 76 |ber-of-h|uman-mov|
|00001f10| 65 73 20 67 6f 6d 6f 6b | 75 2d 65 6d 61 63 73 2d |es gomok|u-emacs-|
|00001f20| 70 6c 61 79 65 64 2d 66 | 69 72 73 74 20 67 6f 6d |played-f|irst gom|
|00001f30| 6f 6b 75 2d 68 75 6d 61 | 6e 2d 74 6f 6f 6b 2d 62 |oku-huma|n-took-b|
|00001f40| 61 63 6b 20 67 6f 6d 6f | 6b 75 2d 68 75 6d 61 6e |ack gomo|ku-human|
|00001f50| 2d 72 65 66 75 73 65 64 | 2d 64 72 61 77 20 67 6f |-refused|-draw go|
|00001f60| 6d 6f 6b 75 2d 69 6e 69 | 74 2d 64 69 73 70 6c 61 |moku-ini|t-displa|
|00001f70| 79 20 67 6f 6d 6f 6b 75 | 2d 69 6e 69 74 2d 73 63 |y gomoku|-init-sc|
|00001f80| 6f 72 65 2d 74 61 62 6c | 65 20 67 6f 6d 6f 6b 75 |ore-tabl|e gomoku|
|00001f90| 2d 69 6e 69 74 2d 62 6f | 61 72 64 5d 20 33 20 22 |-init-bo|ard] 3 "|
|00001fa0| 5c 0a 49 6e 69 74 69 61 | 6c 69 7a 65 20 61 20 6e |\.Initia|lize a n|
|00001fb0| 65 77 20 67 61 6d 65 20 | 6f 6e 20 61 6e 20 4e 20 |ew game |on an N |
|00001fc0| 62 79 20 4d 20 62 6f 61 | 72 64 2e 22 5d 29 0a 28 |by M boa|rd."]).(|
|00001fd0| 64 65 66 61 6c 69 61 73 | 20 27 67 6f 6d 6f 6b 75 |defalias| 'gomoku|
|00001fe0| 2d 70 6c 61 79 2d 6d 6f | 76 65 20 23 5b 28 73 71 |-play-mo|ve #[(sq|
|00001ff0| 75 61 72 65 20 76 61 6c | 20 26 6f 70 74 69 6f 6e |uare val| &option|
|00002000| 61 6c 20 64 6f 6e 74 2d | 75 70 64 61 74 65 2d 73 |al dont-|update-s|
|00002010| 63 6f 72 65 29 20 22 c0 | 11 5c 6e c3 55 83 0e 00 |core) ".|.\n.U...|
|00002020| 5c 66 54 14 82 17 00 0d | c6 55 83 17 00 c0 16 07 |\fT.....|.U......|
|00002030| 0e 08 0e 09 0e 08 48 42 | 0e 5c 6e 42 16 5c 6e 0d |......HB|.\nB.\n.|
|00002040| 54 15 cb 0e 08 5c 6e 5c | 22 88 0e 5c 66 0e 08 5c |T....\n\|"..\f..\|
|00002050| 6e 49 88 0e 0d 84 46 00 | ce 0e 08 5c 6e 5c 22 88 |nI....F.|...\n\".|
|00002060| 0e 09 0e 08 cf 49 88 d0 | 89 11 87 22 20 5b 74 20 |.....I..|..." [t |
|00002070| 67 6f 6d 6f 6b 75 2d 65 | 6d 61 63 73 2d 69 73 2d |gomoku-e|macs-is-|
|00002080| 63 6f 6d 70 75 74 69 6e | 67 20 76 61 6c 20 31 20 |computin|g val 1 |
|00002090| 67 6f 6d 6f 6b 75 2d 6e | 75 6d 62 65 72 2d 6f 66 |gomoku-n|umber-of|
|000020a0| 2d 68 75 6d 61 6e 2d 6d | 6f 76 65 73 20 67 6f 6d |-human-m|oves gom|
|000020b0| 6f 6b 75 2d 6e 75 6d 62 | 65 72 2d 6f 66 2d 6d 6f |oku-numb|er-of-mo|
|000020c0| 76 65 73 20 30 20 67 6f | 6d 6f 6b 75 2d 65 6d 61 |ves 0 go|moku-ema|
|000020d0| 63 73 2d 70 6c 61 79 65 | 64 2d 66 69 72 73 74 20 |cs-playe|d-first |
|000020e0| 73 71 75 61 72 65 20 67 | 6f 6d 6f 6b 75 2d 73 63 |square g|omoku-sc|
|000020f0| 6f 72 65 2d 74 61 62 6c | 65 20 67 6f 6d 6f 6b 75 |ore-tabl|e gomoku|
|00002100| 2d 67 61 6d 65 2d 68 69 | 73 74 6f 72 79 20 67 6f |-game-hi|story go|
|00002110| 6d 6f 6b 75 2d 70 6c 6f | 74 2d 73 71 75 61 72 65 |moku-plo|t-square|
|00002120| 20 67 6f 6d 6f 6b 75 2d | 62 6f 61 72 64 20 64 6f | gomoku-|board do|
|00002130| 6e 74 2d 75 70 64 61 74 | 65 2d 73 63 6f 72 65 20 |nt-updat|e-score |
|00002140| 67 6f 6d 6f 6b 75 2d 75 | 70 64 61 74 65 2d 73 63 |gomoku-u|pdate-sc|
|00002150| 6f 72 65 2d 74 61 62 6c | 65 20 2d 31 20 6e 69 6c |ore-tabl|e -1 nil|
|00002160| 5d 20 33 20 22 5c 0a 47 | 6f 20 74 6f 20 53 51 55 |] 3 "\.G|o to SQU|
|00002170| 41 52 45 2c 20 70 6c 61 | 79 20 56 41 4c 20 61 6e |ARE, pla|y VAL an|
|00002180| 64 20 75 70 64 61 74 65 | 20 65 76 65 72 79 74 68 |d update| everyth|
|00002190| 69 6e 67 2e 22 5d 29 0a | 28 64 65 66 61 6c 69 61 |ing."]).|(defalia|
|000021a0| 73 20 27 67 6f 6d 6f 6b | 75 2d 74 61 6b 65 2d 62 |s 'gomok|u-take-b|
|000021b0| 61 63 6b 20 23 5b 6e 69 | 6c 20 22 c0 11 5c 6e 40 |ack #[ni|l "..\n@|
|000021c0| 89 1b 40 1c 0d 5c 66 48 | 89 1e 06 c7 55 83 18 00 |..@..\fH|....U...|
|000021d0| 0e 08 53 16 08 5c 6e 41 | 12 0e 09 53 16 09 ca 5c |..S..\nA|...S...\|
|000021e0| 66 cb 5c 22 88 0d 5c 66 | cb 49 88 cc 5c 66 0e 06 |f.\"..\f|.I..\f..|
|000021f0| 5b 5c 22 88 0e 0d 5c 66 | 0b 41 49 88 2b ce 89 11 |[\"...\f|.AI.+...|
|00002200| 87 22 20 5b 74 20 67 6f | 6d 6f 6b 75 2d 65 6d 61 |." [t go|moku-ema|
|00002210| 63 73 2d 69 73 2d 63 6f | 6d 70 75 74 69 6e 67 20 |cs-is-co|mputing |
|00002220| 67 6f 6d 6f 6b 75 2d 67 | 61 6d 65 2d 68 69 73 74 |gomoku-g|ame-hist|
|00002230| 6f 72 79 20 6c 61 73 74 | 2d 6d 6f 76 65 20 73 71 |ory last|-move sq|
|00002240| 75 61 72 65 20 67 6f 6d | 6f 6b 75 2d 62 6f 61 72 |uare gom|oku-boar|
|00002250| 64 20 6f 6c 64 76 61 6c | 20 31 20 67 6f 6d 6f 6b |d oldval| 1 gomok|
|00002260| 75 2d 6e 75 6d 62 65 72 | 2d 6f 66 2d 68 75 6d 61 |u-number|-of-huma|
|00002270| 6e 2d 6d 6f 76 65 73 20 | 67 6f 6d 6f 6b 75 2d 6e |n-moves |gomoku-n|
|00002280| 75 6d 62 65 72 2d 6f 66 | 2d 6d 6f 76 65 73 20 67 |umber-of|-moves g|
|00002290| 6f 6d 6f 6b 75 2d 70 6c | 6f 74 2d 73 71 75 61 72 |omoku-pl|ot-squar|
|000022a0| 65 20 30 20 67 6f 6d 6f | 6b 75 2d 75 70 64 61 74 |e 0 gomo|ku-updat|
|000022b0| 65 2d 73 63 6f 72 65 2d | 74 61 62 6c 65 20 67 6f |e-score-|table go|
|000022c0| 6d 6f 6b 75 2d 73 63 6f | 72 65 2d 74 61 62 6c 65 |moku-sco|re-table|
|000022d0| 20 6e 69 6c 5d 20 34 20 | 22 5c 0a 54 61 6b 65 20 | nil] 4 |"\.Take |
|000022e0| 62 61 63 6b 20 6c 61 73 | 74 20 6d 6f 76 65 20 61 |back las|t move a|
|000022f0| 6e 64 20 75 70 64 61 74 | 65 20 65 76 65 72 79 74 |nd updat|e everyt|
|00002300| 68 69 6e 67 2e 22 5d 29 | 0a 28 64 65 66 76 61 72 |hing."])|.(defvar|
|00002310| 20 67 6f 6d 6f 6b 75 2d | 6e 75 6d 62 65 72 2d 6f | gomoku-|number-o|
|00002320| 66 2d 77 69 6e 73 20 30 | 20 22 5c 0a 4e 75 6d 62 |f-wins 0| "\.Numb|
|00002330| 65 72 20 6f 66 20 67 61 | 6d 65 73 20 61 6c 72 65 |er of ga|mes alre|
|00002340| 61 64 79 20 77 6f 6e 20 | 69 6e 20 74 68 69 73 20 |ady won |in this |
|00002350| 73 65 73 73 69 6f 6e 2e | 22 29 0a 28 64 65 66 76 |session.|").(defv|
|00002360| 61 72 20 67 6f 6d 6f 6b | 75 2d 6e 75 6d 62 65 72 |ar gomok|u-number|
|00002370| 2d 6f 66 2d 6c 6f 73 73 | 65 73 20 30 20 22 5c 0a |-of-loss|es 0 "\.|
|00002380| 4e 75 6d 62 65 72 20 6f | 66 20 67 61 6d 65 73 20 |Number o|f games |
|00002390| 61 6c 72 65 61 64 79 20 | 6c 6f 73 74 20 69 6e 20 |already |lost in |
|000023a0| 74 68 69 73 20 73 65 73 | 73 69 6f 6e 2e 22 29 0a |this ses|sion.").|
|000023b0| 28 64 65 66 76 61 72 20 | 67 6f 6d 6f 6b 75 2d 6e |(defvar |gomoku-n|
|000023c0| 75 6d 62 65 72 2d 6f 66 | 2d 64 72 61 77 73 20 30 |umber-of|-draws 0|
|000023d0| 20 22 5c 0a 4e 75 6d 62 | 65 72 20 6f 66 20 67 61 | "\.Numb|er of ga|
|000023e0| 6d 65 73 20 61 6c 72 65 | 61 64 79 20 64 72 61 77 |mes alre|ady draw|
|000023f0| 6e 20 69 6e 20 74 68 69 | 73 20 73 65 73 73 69 6f |n in thi|s sessio|
|00002400| 6e 2e 22 29 0a 28 64 65 | 66 61 6c 69 61 73 20 27 |n.").(de|falias '|
|00002410| 67 6f 6d 6f 6b 75 2d 74 | 65 72 6d 69 6e 61 74 65 |gomoku-t|erminate|
|00002420| 2d 67 61 6d 65 20 23 5b | 28 72 65 73 75 6c 74 29 |-game #[|(result)|
|00002430| 20 22 c0 19 5c 6e c3 3d | 83 4d 00 5c 66 54 14 0d | "..\n.=|.M.\fT..|
|00002440| c6 57 83 15 00 c7 82 49 | 00 0e 08 83 1e 00 c9 82 |.W.....I|........|
|00002450| 49 00 0e 5c 6e 83 27 00 | cb 82 49 00 0e 5c 66 84 |I..\n.'.|..I..\f.|
|00002460| 30 00 cd 82 49 00 0e 0e | cf 55 83 48 00 0e 10 cf |0...I...|.U.H....|
|00002470| 55 83 48 00 5c 66 d1 56 | 83 48 00 d2 82 49 00 d3 |U.H.\f.V|.H...I..|
|00002480| 11 82 c9 00 5c 6e d4 3d | 83 6f 00 0e 0e 54 16 0e |....\n.=|.o...T..|
|00002490| 0e 5c 6e 83 61 00 d5 82 | 6b 00 0e 5c 66 83 6a 00 |.\n.a...|k..\f.j.|
|000024a0| d6 82 6b 00 d7 11 82 c9 | 00 5c 6e d8 3d 83 7d 00 |..k.....|.\n.=.}.|
|000024b0| 5c 66 54 14 d9 11 82 c9 | 00 5c 6e da 3d 83 9f 00 |\fT.....|.\n.=...|
|000024c0| 0e 10 54 16 10 0e 5c 6e | 83 91 00 db 82 9b 00 0e |..T...\n|........|
|000024d0| 5c 66 83 9a 00 dc 82 9b | 00 dd 11 82 c9 00 5c 6e |\f......|......\n|
|000024e0| de 3d 83 c1 00 0e 10 54 | 16 10 0e 5c 6e 83 b3 00 |.=.....T|...\n...|
|000024f0| df 82 bd 00 0e 5c 66 83 | bc 00 e0 82 bd 00 e1 11 |.....\f.|........|
|00002500| 82 c9 00 5c 6e e2 3d 83 | c9 00 e3 11 e4 20 88 09 |...\n.=.|..... ..|
|00002510| 83 d4 00 c1 09 21 88 e5 | 20 88 c0 89 16 26 29 87 |.....!..| ....&).|
|00002520| 22 20 5b 6e 69 6c 20 6d | 65 73 73 61 67 65 20 72 |" [nil m|essage r|
|00002530| 65 73 75 6c 74 20 65 6d | 61 63 73 2d 77 6f 6e 20 |esult em|acs-won |
|00002540| 67 6f 6d 6f 6b 75 2d 6e | 75 6d 62 65 72 2d 6f 66 |gomoku-n|umber-of|
|00002550| 2d 77 69 6e 73 20 67 6f | 6d 6f 6b 75 2d 6e 75 6d |-wins go|moku-num|
|00002560| 62 65 72 2d 6f 66 2d 6d | 6f 76 65 73 20 32 30 20 |ber-of-m|oves 20 |
|00002570| 22 54 68 69 73 20 77 61 | 73 20 61 20 52 45 41 4c |"This wa|s a REAL|
|00002580| 4c 59 20 51 55 49 43 4b | 20 77 69 6e 2e 22 20 67 |LY QUICK| win." g|
|00002590| 6f 6d 6f 6b 75 2d 68 75 | 6d 61 6e 2d 72 65 66 75 |omoku-hu|man-refu|
|000025a0| 73 65 64 2d 64 72 61 77 | 20 22 49 20 77 6f 6e 2e |sed-draw| "I won.|
|000025b0| 2e 2e 20 54 6f 6f 20 62 | 61 64 20 79 6f 75 20 72 |.. Too b|ad you r|
|000025c0| 65 66 75 73 65 64 20 6d | 79 20 6f 66 66 65 72 20 |efused m|y offer |
|000025d0| 6f 66 20 61 20 64 72 61 | 77 20 21 22 20 67 6f 6d |of a dra|w !" gom|
|000025e0| 6f 6b 75 2d 68 75 6d 61 | 6e 2d 74 6f 6f 6b 2d 62 |oku-huma|n-took-b|
|000025f0| 61 63 6b 20 22 49 20 77 | 6f 6e 2e 2e 2e 20 54 61 |ack "I w|on... Ta|
|00002600| 6b 69 6e 67 20 6d 6f 76 | 65 73 20 62 61 63 6b 20 |king mov|es back |
|00002610| 77 69 6c 6c 20 6e 6f 74 | 20 68 65 6c 70 20 79 6f |will not| help yo|
|00002620| 75 20 21 22 20 67 6f 6d | 6f 6b 75 2d 65 6d 61 63 |u !" gom|oku-emac|
|00002630| 73 2d 70 6c 61 79 65 64 | 2d 66 69 72 73 74 20 22 |s-played|-first "|
|00002640| 49 20 77 6f 6e 2e 2e 2e | 20 50 6c 61 79 69 6e 67 |I won...| Playing|
|00002650| 20 66 69 72 73 74 20 64 | 69 64 20 6e 6f 74 20 68 | first d|id not h|
|00002660| 65 6c 70 20 79 6f 75 20 | 6d 75 63 68 20 21 22 20 |elp you |much !" |
|00002670| 67 6f 6d 6f 6b 75 2d 6e | 75 6d 62 65 72 2d 6f 66 |gomoku-n|umber-of|
|00002680| 2d 6c 6f 73 73 65 73 20 | 30 20 67 6f 6d 6f 6b 75 |-losses |0 gomoku|
|00002690| 2d 6e 75 6d 62 65 72 2d | 6f 66 2d 64 72 61 77 73 |-number-|of-draws|
|000026a0| 20 31 20 22 49 27 6d 20 | 62 65 63 6f 6d 69 6e 67 | 1 "I'm |becoming|
|000026b0| 20 74 69 72 65 64 20 6f | 66 20 77 69 6e 6e 69 6e | tired o|f winnin|
|000026c0| 67 2e 2e 2e 22 20 22 49 | 20 77 6f 6e 2e 22 20 68 |g..." "I| won." h|
|000026d0| 75 6d 61 6e 2d 77 6f 6e | 20 22 4f 4b 2c 20 79 6f |uman-won| "OK, yo|
|000026e0| 75 20 77 6f 6e 20 74 68 | 69 73 20 6f 6e 65 2e 20 |u won th|is one. |
|000026f0| 20 49 2c 20 66 6f 72 20 | 6f 6e 65 2c 20 6e 65 76 | I, for |one, nev|
|00002700| 65 72 20 74 61 6b 65 20 | 6d 79 20 6d 6f 76 65 73 |er take |my moves|
|00002710| 20 62 61 63 6b 2e 2e 2e | 22 20 22 4f 4b 2c 20 79 | back...|" "OK, y|
|00002720| 6f 75 20 77 6f 6e 20 74 | 68 69 73 20 6f 6e 65 2e |ou won t|his one.|
|00002730| 2e 2e 20 73 6f 20 77 68 | 61 74 20 3f 22 20 22 4f |.. so wh|at ?" "O|
|00002740| 4b 2c 20 79 6f 75 20 77 | 6f 6e 20 74 68 69 73 20 |K, you w|on this |
|00002750| 6f 6e 65 2e 20 20 4e 6f | 77 2c 20 6c 65 74 20 6d |one. No|w, let m|
|00002760| 65 20 70 6c 61 79 20 66 | 69 72 73 74 20 6a 75 73 |e play f|irst jus|
|00002770| 74 20 6f 6e 63 65 2e 22 | 20 68 75 6d 61 6e 2d 72 |t once."| human-r|
|00002780| 65 73 69 67 6e 65 64 20 | 22 53 6f 20 79 6f 75 20 |esigned |"So you |
|00002790| 72 65 73 69 67 6e 2e 20 | 20 54 68 61 74 27 73 20 |resign. | That's |
|000027a0| 6a 75 73 74 20 6f 6e 65 | 20 6d 6f 72 65 20 77 69 |just one| more wi|
|000027b0| 6e 20 66 6f 72 20 6d 65 | 2e 22 20 6e 6f 62 6f 64 |n for me|." nobod|
|000027c0| 79 2d 77 6f 6e 20 22 54 | 68 69 73 20 69 73 20 61 |y-won "T|his is a|
|000027d0| 20 64 72 61 77 2e 20 20 | 49 2c 20 66 6f 72 20 6f | draw. |I, for o|
|000027e0| 6e 65 2c 20 6e 65 76 65 | 72 20 74 61 6b 65 20 6d |ne, neve|r take m|
|000027f0| 79 20 6d 6f 76 65 73 20 | 62 61 63 6b 2e 2e 2e 22 |y moves |back..."|
|00002800| 20 22 54 68 69 73 20 69 | 73 20 61 20 64 72 61 77 | "This i|s a draw|
|00002810| 2e 20 20 4a 75 73 74 20 | 63 68 61 6e 63 65 2c 20 |. Just |chance, |
|00002820| 49 20 67 75 65 73 73 2e | 22 20 22 54 68 69 73 20 |I guess.|" "This |
|00002830| 69 73 20 61 20 64 72 61 | 77 2e 20 20 4e 6f 77 2c |is a dra|w. Now,|
|00002840| 20 6c 65 74 20 6d 65 20 | 70 6c 61 79 20 66 69 72 | let me |play fir|
|00002850| 73 74 20 6a 75 73 74 20 | 6f 6e 63 65 2e 22 20 64 |st just |once." d|
|00002860| 72 61 77 2d 61 67 72 65 | 65 64 20 22 44 72 61 77 |raw-agre|ed "Draw|
|00002870| 20 61 67 72 65 65 64 2e | 20 20 49 2c 20 66 6f 72 | agreed.| I, for|
|00002880| 20 6f 6e 65 2c 20 6e 65 | 76 65 72 20 74 61 6b 65 | one, ne|ver take|
|00002890| 20 6d 79 20 6d 6f 76 65 | 73 20 62 61 63 6b 2e 2e | my move|s back..|
|000028a0| 2e 22 20 22 44 72 61 77 | 20 61 67 72 65 65 64 2e |." "Draw| agreed.|
|000028b0| 20 20 59 6f 75 20 77 65 | 72 65 20 6c 75 63 6b 79 | You we|re lucky|
|000028c0| 2e 22 20 22 44 72 61 77 | 20 61 67 72 65 65 64 2e |." "Draw| agreed.|
|000028d0| 20 20 4e 6f 77 2c 20 6c | 65 74 20 6d 65 20 70 6c | Now, l|et me pl|
|000028e0| 61 79 20 66 69 72 73 74 | 20 6a 75 73 74 20 6f 6e |ay first| just on|
|000028f0| 63 65 2e 22 20 63 72 61 | 73 68 2d 67 61 6d 65 20 |ce." cra|sh-game |
|00002900| 22 53 6f 72 72 79 2c 20 | 49 20 68 61 76 65 20 62 |"Sorry, |I have b|
|00002910| 65 65 6e 20 69 6e 74 65 | 72 72 75 70 74 65 64 20 |een inte|rrupted |
|00002920| 61 6e 64 20 63 61 6e 6e | 6f 74 20 72 65 73 75 6d |and cann|ot resum|
|00002930| 65 20 74 68 61 74 20 67 | 61 6d 65 2e 2e 2e 22 20 |e that g|ame..." |
|00002940| 67 6f 6d 6f 6b 75 2d 64 | 69 73 70 6c 61 79 2d 73 |gomoku-d|isplay-s|
|00002950| 74 61 74 69 73 74 69 63 | 73 20 64 69 6e 67 20 67 |tatistic|s ding g|
|00002960| 6f 6d 6f 6b 75 2d 67 61 | 6d 65 2d 69 6e 2d 70 72 |omoku-ga|me-in-pr|
|00002970| 6f 67 72 65 73 73 5d 20 | 32 20 22 5c 0a 54 65 72 |ogress] |2 "\.Ter|
|00002980| 6d 69 6e 61 74 65 20 74 | 68 65 20 63 75 72 72 65 |minate t|he curre|
|00002990| 6e 74 20 67 61 6d 65 20 | 77 69 74 68 20 52 45 53 |nt game |with RES|
|000029a0| 55 4c 54 2e 22 5d 29 0a | 28 64 65 66 61 6c 69 61 |ULT."]).|(defalia|
|000029b0| 73 20 27 67 6f 6d 6f 6b | 75 2d 63 72 61 73 68 2d |s 'gomok|u-crash-|
|000029c0| 67 61 6d 65 20 23 5b 6e | 69 6c 20 22 c0 11 c2 c3 |game #[n|il "....|
|000029d0| 21 88 c4 c5 21 88 c6 20 | 87 22 20 5b 6e 69 6c 20 |!...!.. |." [nil |
|000029e0| 67 6f 6d 6f 6b 75 2d 65 | 6d 61 63 73 2d 69 73 2d |gomoku-e|macs-is-|
|000029f0| 63 6f 6d 70 75 74 69 6e | 67 20 67 6f 6d 6f 6b 75 |computin|g gomoku|
|00002a00| 2d 74 65 72 6d 69 6e 61 | 74 65 2d 67 61 6d 65 20 |-termina|te-game |
|00002a10| 63 72 61 73 68 2d 67 61 | 6d 65 20 73 69 74 2d 66 |crash-ga|me sit-f|
|00002a20| 6f 72 20 34 20 67 6f 6d | 6f 6b 75 2d 70 72 6f 6d |or 4 gom|oku-prom|
|00002a30| 70 74 2d 66 6f 72 2d 6f | 74 68 65 72 2d 67 61 6d |pt-for-o|ther-gam|
|00002a40| 65 5d 20 32 20 22 5c 0a | 57 68 61 74 20 74 6f 20 |e] 2 "\.|What to |
|00002a50| 64 6f 20 77 68 65 6e 20 | 45 6d 61 63 73 20 64 65 |do when |Emacs de|
|00002a60| 74 65 63 74 73 20 69 74 | 20 68 61 73 20 62 65 65 |tects it| has bee|
|00002a70| 6e 20 69 6e 74 65 72 72 | 75 70 74 65 64 2e 22 5d |n interr|upted."]|
|00002a80| 29 0a 28 64 65 66 61 6c | 69 61 73 20 27 67 6f 6d |).(defal|ias 'gom|
|00002a90| 6f 6b 75 20 23 5b 28 26 | 6f 70 74 69 6f 6e 61 6c |oku #[(&|optional|
|00002aa0| 20 6e 20 6d 29 20 22 c0 | 20 88 09 83 5c 6e 00 c2 | n m) ".| ...\n..|
|00002ab0| 20 87 0b 84 88 00 c4 20 | c5 20 1e 06 1e 07 0e 08 | ...... |. ......|
|00002ac0| 84 1f 00 0e 07 16 08 0e | 09 84 28 00 0e 06 16 09 |........|..(.....|
|00002ad0| 0e 08 ca 57 83 36 00 cb | cc 21 88 82 52 00 0e 09 |...W.6..|.!..R...|
|00002ae0| ca 57 83 44 00 cb cd 21 | 88 82 52 00 0e 08 0e 07 |.W.D...!|..R.....|
|00002af0| 56 83 52 00 cb ce 0e 08 | 5c 22 88 0e 09 0e 06 56 |V.R.....|\".....V|
|00002b00| 83 70 00 0e 09 0e 0f 9a | 84 70 00 d0 d1 d2 0e 09 |.p......|.p......|
|00002b10| 5c 22 21 84 70 00 0e 06 | 16 09 2a d3 d4 21 88 d5 |\"!.p...|..*..!..|
|00002b20| 0e 08 0e 09 5c 22 88 d0 | d6 21 83 85 00 d7 20 87 |....\"..|.!.... .|
|00002b30| d8 20 87 d0 d9 21 83 91 | 00 d8 20 87 da 20 87 22 |. ...!..|.. .. ."|
|00002b40| 20 5b 67 6f 6d 6f 6b 75 | 2d 73 77 69 74 63 68 2d | [gomoku|-switch-|
|00002b50| 74 6f 2d 77 69 6e 64 6f | 77 20 67 6f 6d 6f 6b 75 |to-windo|w gomoku|
|00002b60| 2d 65 6d 61 63 73 2d 69 | 73 2d 63 6f 6d 70 75 74 |-emacs-i|s-comput|
|00002b70| 69 6e 67 20 67 6f 6d 6f | 6b 75 2d 63 72 61 73 68 |ing gomo|ku-crash|
|00002b80| 2d 67 61 6d 65 20 67 6f | 6d 6f 6b 75 2d 67 61 6d |-game go|moku-gam|
|00002b90| 65 2d 69 6e 2d 70 72 6f | 67 72 65 73 73 20 67 6f |e-in-pro|gress go|
|00002ba0| 6d 6f 6b 75 2d 6d 61 78 | 2d 77 69 64 74 68 20 67 |moku-max|-width g|
|00002bb0| 6f 6d 6f 6b 75 2d 6d 61 | 78 2d 68 65 69 67 68 74 |omoku-ma|x-height|
|00002bc0| 20 6d 61 78 2d 68 65 69 | 67 68 74 20 6d 61 78 2d | max-hei|ght max-|
|00002bd0| 77 69 64 74 68 20 6e 20 | 6d 20 31 20 65 72 72 6f |width n |m 1 erro|
|00002be0| 72 20 22 49 20 6e 65 65 | 64 20 61 74 20 6c 65 61 |r "I nee|d at lea|
|00002bf0| 73 74 20 31 20 63 6f 6c | 75 6d 6e 22 20 22 49 20 |st 1 col|umn" "I |
|00002c00| 6e 65 65 64 20 61 74 20 | 6c 65 61 73 74 20 31 20 |need at |least 1 |
|00002c10| 72 6f 77 22 20 22 49 20 | 63 61 6e 6e 6f 74 20 64 |row" "I |cannot d|
|00002c20| 69 73 70 6c 61 79 20 25 | 64 20 63 6f 6c 75 6d 6e |isplay %|d column|
|00002c30| 73 20 69 6e 20 74 68 61 | 74 20 77 69 6e 64 6f 77 |s in tha|t window|
|00002c40| 22 20 67 6f 6d 6f 6b 75 | 2d 73 61 76 65 64 2d 62 |" gomoku|-saved-b|
|00002c50| 6f 61 72 64 2d 68 65 69 | 67 68 74 20 79 2d 6f 72 |oard-hei|ght y-or|
|00002c60| 2d 6e 2d 70 20 66 6f 72 | 6d 61 74 20 22 44 6f 20 |-n-p for|mat "Do |
|00002c70| 79 6f 75 20 72 65 61 6c | 6c 79 20 77 61 6e 74 20 |you real|ly want |
|00002c80| 25 64 20 72 6f 77 73 20 | 22 20 6d 65 73 73 61 67 |%d rows |" messag|
|00002c90| 65 20 22 4f 6e 65 20 6d | 6f 6d 65 6e 74 2c 20 70 |e "One m|oment, p|
|00002ca0| 6c 65 61 73 65 2e 2e 2e | 22 20 67 6f 6d 6f 6b 75 |lease...|" gomoku|
|00002cb0| 2d 73 74 61 72 74 2d 67 | 61 6d 65 20 22 44 6f 20 |-start-g|ame "Do |
|00002cc0| 79 6f 75 20 61 6c 6c 6f | 77 20 6d 65 20 74 6f 20 |you allo|w me to |
|00002cd0| 70 6c 61 79 20 66 69 72 | 73 74 20 22 20 67 6f 6d |play fir|st " gom|
|00002ce0| 6f 6b 75 2d 65 6d 61 63 | 73 2d 70 6c 61 79 73 20 |oku-emac|s-plays |
|00002cf0| 67 6f 6d 6f 6b 75 2d 70 | 72 6f 6d 70 74 2d 66 6f |gomoku-p|rompt-fo|
|00002d00| 72 2d 6d 6f 76 65 20 22 | 53 68 61 6c 6c 20 77 65 |r-move "|Shall we|
|00002d10| 20 63 6f 6e 74 69 6e 75 | 65 20 6f 75 72 20 67 61 | continu|e our ga|
|00002d20| 6d 65 20 22 20 67 6f 6d | 6f 6b 75 2d 68 75 6d 61 |me " gom|oku-huma|
|00002d30| 6e 2d 72 65 73 69 67 6e | 73 5d 20 34 20 22 5c 0a |n-resign|s] 4 "\.|
|00002d40| 53 74 61 72 74 20 61 20 | 47 6f 6d 6f 6b 75 20 67 |Start a |Gomoku g|
|00002d50| 61 6d 65 20 62 65 74 77 | 65 65 6e 20 79 6f 75 20 |ame betw|een you |
|00002d60| 61 6e 64 20 45 6d 61 63 | 73 2e 0a 49 66 20 61 20 |and Emac|s..If a |
|00002d70| 67 61 6d 65 20 69 73 20 | 69 6e 20 70 72 6f 67 72 |game is |in progr|
|00002d80| 65 73 73 2c 20 74 68 69 | 73 20 63 6f 6d 6d 61 6e |ess, thi|s comman|
|00002d90| 64 20 61 6c 6c 6f 77 20 | 79 6f 75 20 74 6f 20 72 |d allow |you to r|
|00002da0| 65 73 75 6d 65 20 69 74 | 2e 0a 49 66 20 6f 70 74 |esume it|..If opt|
|00002db0| 69 6f 6e 61 6c 20 61 72 | 67 75 6d 65 6e 74 73 20 |ional ar|guments |
|00002dc0| 4e 20 61 6e 64 20 4d 20 | 61 72 65 20 67 69 76 65 |N and M |are give|
|00002dd0| 6e 2c 20 61 6e 20 4e 20 | 62 79 20 4d 20 62 6f 61 |n, an N |by M boa|
|00002de0| 72 64 20 69 73 20 75 73 | 65 64 2e 0a 0a 59 6f 75 |rd is us|ed...You|
|00002df0| 20 61 6e 64 20 45 6d 61 | 63 73 20 70 6c 61 79 20 | and Ema|cs play |
|00002e00| 69 6e 20 74 75 72 6e 20 | 62 79 20 6d 61 72 6b 69 |in turn |by marki|
|00002e10| 6e 67 20 61 20 66 72 65 | 65 20 73 71 75 61 72 65 |ng a fre|e square|
|00002e20| 2e 20 20 59 6f 75 20 6d | 61 72 6b 20 69 74 20 77 |. You m|ark it w|
|00002e30| 69 74 68 20 58 0a 61 6e | 64 20 45 6d 61 63 73 20 |ith X.an|d Emacs |
|00002e40| 6d 61 72 6b 73 20 69 74 | 20 77 69 74 68 20 4f 2e |marks it| with O.|
|00002e50| 20 54 68 65 20 77 69 6e | 6e 65 72 20 69 73 20 74 | The win|ner is t|
|00002e60| 68 65 20 66 69 72 73 74 | 20 74 6f 20 67 65 74 20 |he first| to get |
|00002e70| 66 69 76 65 20 63 6f 6e | 74 69 67 75 6f 75 73 0a |five con|tiguous.|
|00002e80| 6d 61 72 6b 73 20 68 6f | 72 69 7a 6f 6e 74 61 6c |marks ho|rizontal|
|00002e90| 6c 79 2c 20 76 65 72 74 | 69 63 61 6c 6c 79 20 6f |ly, vert|ically o|
|00002ea0| 72 20 69 6e 20 64 69 61 | 67 6f 6e 61 6c 2e 0a 0a |r in dia|gonal...|
|00002eb0| 59 6f 75 20 70 6c 61 79 | 20 62 79 20 6d 6f 76 69 |You play| by movi|
|00002ec0| 6e 67 20 74 68 65 20 63 | 75 72 73 6f 72 20 6f 76 |ng the c|ursor ov|
|00002ed0| 65 72 20 74 68 65 20 73 | 71 75 61 72 65 20 79 6f |er the s|quare yo|
|00002ee0| 75 20 63 68 6f 6f 73 65 | 20 61 6e 64 20 68 69 74 |u choose| and hit|
|00002ef0| 74 69 6e 67 0a 5c 5c 3c | 67 6f 6d 6f 6b 75 2d 6d |ting.\\<|gomoku-m|
|00002f00| 6f 64 65 2d 6d 61 70 3e | 5c 5c 5b 67 6f 6d 6f 6b |ode-map>|\\[gomok|
|00002f10| 75 2d 68 75 6d 61 6e 2d | 70 6c 61 79 73 5d 2e 0a |u-human-|plays]..|
|00002f20| 55 73 65 20 5c 5c 5b 64 | 65 73 63 72 69 62 65 2d |Use \\[d|escribe-|
|00002f30| 6d 6f 64 65 5d 20 66 6f | 72 20 6d 6f 72 65 20 69 |mode] fo|r more i|
|00002f40| 6e 66 6f 2e 22 20 6e 69 | 6c 5d 29 0a 28 64 65 66 |nfo." ni|l]).(def|
|00002f50| 61 6c 69 61 73 20 27 67 | 6f 6d 6f 6b 75 2d 65 6d |alias 'g|omoku-em|
|00002f60| 61 63 73 2d 70 6c 61 79 | 73 20 23 5b 6e 69 6c 20 |acs-play|s #[nil |
|00002f70| 22 c0 20 88 09 83 5c 6e | 00 c2 20 87 0b 84 11 00 |". ...\n|.. .....|
|00002f80| c4 20 87 c5 c6 21 88 c7 | 89 1e 08 1e 09 ca 20 89 |. ...!..|...... .|
|00002f90| 16 09 84 29 00 cb cc 21 | 82 74 00 0e 0d 0e 09 48 |...)...!|.t.....H|
|00002fa0| 16 08 ce 0e 09 cf 5c 22 | 88 0e 08 0e 10 59 83 4d |......\"|.....Y.M|
|00002fb0| 00 d1 0e 09 cf 5c 22 88 | d2 20 88 cb d3 21 82 74 |.....\".|. ...!.t|
|00002fc0| 00 0e 08 d4 55 83 5a 00 | cb cc 21 82 74 00 0e 15 |....U.Z.|..!.t...|
|00002fd0| 0e 16 56 83 72 00 0e 17 | 84 72 00 d8 20 83 72 00 |..V.r...|.r.. .r.|
|00002fe0| cb d9 21 82 74 00 da 20 | 2a 87 22 20 5b 67 6f 6d |..!.t.. |*." [gom|
|00002ff0| 6f 6b 75 2d 73 77 69 74 | 63 68 2d 74 6f 2d 77 69 |oku-swit|ch-to-wi|
|00003000| 6e 64 6f 77 20 67 6f 6d | 6f 6b 75 2d 65 6d 61 63 |ndow gom|oku-emac|
|00003010| 73 2d 69 73 2d 63 6f 6d | 70 75 74 69 6e 67 20 67 |s-is-com|puting g|
|00003020| 6f 6d 6f 6b 75 2d 63 72 | 61 73 68 2d 67 61 6d 65 |omoku-cr|ash-game|
|00003030| 20 67 6f 6d 6f 6b 75 2d | 67 61 6d 65 2d 69 6e 2d | gomoku-|game-in-|
|00003040| 70 72 6f 67 72 65 73 73 | 20 67 6f 6d 6f 6b 75 2d |progress| gomoku-|
|00003050| 70 72 6f 6d 70 74 2d 66 | 6f 72 2d 6f 74 68 65 72 |prompt-f|or-other|
|00003060| 2d 67 61 6d 65 20 6d 65 | 73 73 61 67 65 20 22 4c |-game me|ssage "L|
|00003070| 65 74 20 6d 65 20 74 68 | 69 6e 6b 2e 2e 2e 22 20 |et me th|ink..." |
|00003080| 6e 69 6c 20 73 63 6f 72 | 65 20 73 71 75 61 72 65 |nil scor|e square|
|00003090| 20 67 6f 6d 6f 6b 75 2d | 73 74 72 6f 6e 67 65 73 | gomoku-|stronges|
|000030a0| 74 2d 73 71 75 61 72 65 | 20 67 6f 6d 6f 6b 75 2d |t-square| gomoku-|
|000030b0| 74 65 72 6d 69 6e 61 74 | 65 2d 67 61 6d 65 20 6e |terminat|e-game n|
|000030c0| 6f 62 6f 64 79 2d 77 6f | 6e 20 67 6f 6d 6f 6b 75 |obody-wo|n gomoku|
|000030d0| 2d 73 63 6f 72 65 2d 74 | 61 62 6c 65 20 67 6f 6d |-score-t|able gom|
|000030e0| 6f 6b 75 2d 70 6c 61 79 | 2d 6d 6f 76 65 20 36 20 |oku-play|-move 6 |
|000030f0| 67 6f 6d 6f 6b 75 2d 77 | 69 6e 6e 69 6e 67 2d 74 |gomoku-w|inning-t|
|00003100| 68 72 65 73 68 6f 6c 64 | 20 67 6f 6d 6f 6b 75 2d |hreshold| gomoku-|
|00003110| 66 69 6e 64 2d 66 69 6c | 6c 65 64 2d 71 74 75 70 |find-fil|led-qtup|
|00003120| 6c 65 20 67 6f 6d 6f 6b | 75 2d 63 72 6f 73 73 2d |le gomok|u-cross-|
|00003130| 77 69 6e 6e 69 6e 67 2d | 71 74 75 70 6c 65 20 65 |winning-|qtuple e|
|00003140| 6d 61 63 73 2d 77 6f 6e | 20 30 20 67 6f 6d 6f 6b |macs-won| 0 gomok|
|00003150| 75 2d 6e 75 6d 62 65 72 | 2d 6f 66 2d 6d 6f 76 65 |u-number|-of-move|
|00003160| 73 20 67 6f 6d 6f 6b 75 | 2d 64 72 61 77 2d 6c 69 |s gomoku|-draw-li|
|00003170| 6d 69 74 20 67 6f 6d 6f | 6b 75 2d 68 75 6d 61 6e |mit gomo|ku-human|
|00003180| 2d 72 65 66 75 73 65 64 | 2d 64 72 61 77 20 67 6f |-refused|-draw go|
|00003190| 6d 6f 6b 75 2d 6f 66 66 | 65 72 2d 61 2d 64 72 61 |moku-off|er-a-dra|
|000031a0| 77 20 64 72 61 77 2d 61 | 67 72 65 65 64 20 67 6f |w draw-a|greed go|
|000031b0| 6d 6f 6b 75 2d 70 72 6f | 6d 70 74 2d 66 6f 72 2d |moku-pro|mpt-for-|
|000031c0| 6d 6f 76 65 5d 20 34 20 | 22 5c 0a 43 6f 6d 70 75 |move] 4 |"\.Compu|
|000031d0| 74 65 20 45 6d 61 63 73 | 20 6e 65 78 74 20 6d 6f |te Emacs| next mo|
|000031e0| 76 65 20 61 6e 64 20 70 | 6c 61 79 20 69 74 2e 22 |ve and p|lay it."|
|000031f0| 20 6e 69 6c 5d 29 0a 28 | 64 65 66 61 6c 69 61 73 | nil]).(|defalias|
|00003200| 20 27 67 6f 6d 6f 6b 75 | 2d 68 75 6d 61 6e 2d 70 | 'gomoku|-human-p|
|00003210| 6c 61 79 73 20 23 5b 6e | 69 6c 20 22 c0 20 88 09 |lays #[n|il ". ..|
|00003220| 83 5c 6e 00 c2 20 87 0b | 84 11 00 c4 20 87 c5 89 |.\n.. ..|.... ...|
|00003230| 1e 06 1e 07 c8 20 89 16 | 07 84 25 00 c9 ca 21 82 |..... ..|..%...!.|
|00003240| 5d 00 0e 0b 0e 07 48 cc | 55 84 35 00 c9 cd 21 82 |].....H.|U.5...!.|
|00003250| 5d 00 0e 0e 0e 07 48 16 | 06 cf 0e 07 d0 5c 22 88 |].....H.|.....\".|
|00003260| 0e 06 0e 11 59 83 5b 00 | d2 0e 07 d0 5c 22 83 5b |....Y.[.|....\".[|
|00003270| 00 d3 20 88 d4 d5 21 82 | 5d 00 d6 20 2a 87 22 20 |.. ...!.|].. *." |
|00003280| 5b 67 6f 6d 6f 6b 75 2d | 73 77 69 74 63 68 2d 74 |[gomoku-|switch-t|
|00003290| 6f 2d 77 69 6e 64 6f 77 | 20 67 6f 6d 6f 6b 75 2d |o-window| gomoku-|
|000032a0| 65 6d 61 63 73 2d 69 73 | 2d 63 6f 6d 70 75 74 69 |emacs-is|-computi|
|000032b0| 6e 67 20 67 6f 6d 6f 6b | 75 2d 63 72 61 73 68 2d |ng gomok|u-crash-|
|000032c0| 67 61 6d 65 20 67 6f 6d | 6f 6b 75 2d 67 61 6d 65 |game gom|oku-game|
|000032d0| 2d 69 6e 2d 70 72 6f 67 | 72 65 73 73 20 67 6f 6d |-in-prog|ress gom|
|000032e0| 6f 6b 75 2d 70 72 6f 6d | 70 74 2d 66 6f 72 2d 6f |oku-prom|pt-for-o|
|000032f0| 74 68 65 72 2d 67 61 6d | 65 20 6e 69 6c 20 73 63 |ther-gam|e nil sc|
|00003300| 6f 72 65 20 73 71 75 61 | 72 65 20 67 6f 6d 6f 6b |ore squa|re gomok|
|00003310| 75 2d 70 6f 69 6e 74 2d | 73 71 75 61 72 65 20 65 |u-point-|square e|
|00003320| 72 72 6f 72 20 22 59 6f | 75 72 20 70 6f 69 6e 74 |rror "Yo|ur point|
|00003330| 20 69 73 20 6e 6f 74 20 | 6f 6e 20 61 20 73 71 75 | is not |on a squ|
|00003340| 61 72 65 2e 20 52 65 74 | 72 79 20 21 22 20 67 6f |are. Ret|ry !" go|
|00003350| 6d 6f 6b 75 2d 62 6f 61 | 72 64 20 30 20 22 59 6f |moku-boa|rd 0 "Yo|
|00003360| 75 72 20 70 6f 69 6e 74 | 20 69 73 20 6e 6f 74 20 |ur point| is not |
|00003370| 6f 6e 20 61 20 66 72 65 | 65 20 73 71 75 61 72 65 |on a fre|e square|
|00003380| 2e 20 52 65 74 72 79 20 | 21 22 20 67 6f 6d 6f 6b |. Retry |!" gomok|
|00003390| 75 2d 73 63 6f 72 65 2d | 74 61 62 6c 65 20 67 6f |u-score-|table go|
|000033a0| 6d 6f 6b 75 2d 70 6c 61 | 79 2d 6d 6f 76 65 20 31 |moku-pla|y-move 1|
|000033b0| 20 67 6f 6d 6f 6b 75 2d | 6c 6f 6f 73 69 6e 67 2d | gomoku-|loosing-|
|000033c0| 74 68 72 65 73 68 6f 6c | 64 20 67 6f 6d 6f 6b 75 |threshol|d gomoku|
|000033d0| 2d 66 69 6e 64 2d 66 69 | 6c 6c 65 64 2d 71 74 75 |-find-fi|lled-qtu|
|000033e0| 70 6c 65 20 67 6f 6d 6f | 6b 75 2d 63 72 6f 73 73 |ple gomo|ku-cross|
|000033f0| 2d 77 69 6e 6e 69 6e 67 | 2d 71 74 75 70 6c 65 20 |-winning|-qtuple |
|00003400| 67 6f 6d 6f 6b 75 2d 74 | 65 72 6d 69 6e 61 74 65 |gomoku-t|erminate|
|00003410| 2d 67 61 6d 65 20 68 75 | 6d 61 6e 2d 77 6f 6e 20 |-game hu|man-won |
|00003420| 67 6f 6d 6f 6b 75 2d 65 | 6d 61 63 73 2d 70 6c 61 |gomoku-e|macs-pla|
|00003430| 79 73 5d 20 34 20 22 5c | 0a 53 69 67 6e 61 6c 20 |ys] 4 "\|.Signal |
|00003440| 74 6f 20 74 68 65 20 47 | 6f 6d 6f 6b 75 20 70 72 |to the G|omoku pr|
|00003450| 6f 67 72 61 6d 20 74 68 | 61 74 20 79 6f 75 20 68 |ogram th|at you h|
|00003460| 61 76 65 20 70 6c 61 79 | 65 64 2e 0a 59 6f 75 20 |ave play|ed..You |
|00003470| 6d 75 73 74 20 68 61 76 | 65 20 70 75 74 20 74 68 |must hav|e put th|
|00003480| 65 20 63 75 72 73 6f 72 | 20 6f 6e 20 74 68 65 20 |e cursor| on the |
|00003490| 73 71 75 61 72 65 20 77 | 68 65 72 65 20 79 6f 75 |square w|here you|
|000034a0| 20 77 61 6e 74 20 74 6f | 20 70 6c 61 79 2e 0a 49 | want to| play..I|
|000034b0| 66 20 74 68 65 20 67 61 | 6d 65 20 69 73 20 66 69 |f the ga|me is fi|
|000034c0| 6e 69 73 68 65 64 2c 20 | 74 68 69 73 20 63 6f 6d |nished, |this com|
|000034d0| 6d 61 6e 64 20 72 65 71 | 75 65 73 74 73 20 66 6f |mand req|uests fo|
|000034e0| 72 20 61 6e 6f 74 68 65 | 72 20 67 61 6d 65 2e 22 |r anothe|r game."|
|000034f0| 20 6e 69 6c 5d 29 0a 28 | 64 65 66 61 6c 69 61 73 | nil]).(|defalias|
|00003500| 20 27 67 6f 6d 6f 6b 75 | 2d 68 75 6d 61 6e 2d 74 | 'gomoku|-human-t|
|00003510| 61 6b 65 73 2d 62 61 63 | 6b 20 23 5b 6e 69 6c 20 |akes-bac|k #[nil |
|00003520| 22 c0 20 88 09 83 5c 6e | 00 c2 20 87 0b 84 19 00 |". ...\n|.. .....|
|00003530| c4 c5 21 88 c6 c7 21 88 | c8 20 87 0e 09 ca 55 83 |..!...!.|. ....U.|
|00003540| 24 00 c4 cb 21 87 c4 cc | 21 88 cd 16 0e 0e 09 1e |$...!...|!.......|
|00003550| 0f 0e 0f 0e 09 55 83 3d | 00 d0 20 88 82 2f 00 29 |.....U.=|.. ../.)|
|00003560| d1 20 87 22 20 5b 67 6f | 6d 6f 6b 75 2d 73 77 69 |. ." [go|moku-swi|
|00003570| 74 63 68 2d 74 6f 2d 77 | 69 6e 64 6f 77 20 67 6f |tch-to-w|indow go|
|00003580| 6d 6f 6b 75 2d 65 6d 61 | 63 73 2d 69 73 2d 63 6f |moku-ema|cs-is-co|
|00003590| 6d 70 75 74 69 6e 67 20 | 67 6f 6d 6f 6b 75 2d 63 |mputing |gomoku-c|
|000035a0| 72 61 73 68 2d 67 61 6d | 65 20 67 6f 6d 6f 6b 75 |rash-gam|e gomoku|
|000035b0| 2d 67 61 6d 65 2d 69 6e | 2d 70 72 6f 67 72 65 73 |-game-in|-progres|
|000035c0| 73 20 6d 65 73 73 61 67 | 65 20 22 54 6f 6f 20 6c |s messag|e "Too l|
|000035d0| 61 74 65 20 66 6f 72 20 | 74 61 6b 69 6e 67 20 62 |ate for |taking b|
|000035e0| 61 63 6b 2e 2e 2e 22 20 | 73 69 74 2d 66 6f 72 20 |ack..." |sit-for |
|000035f0| 34 20 67 6f 6d 6f 6b 75 | 2d 70 72 6f 6d 70 74 2d |4 gomoku|-prompt-|
|00003600| 66 6f 72 2d 6f 74 68 65 | 72 2d 67 61 6d 65 20 67 |for-othe|r-game g|
|00003610| 6f 6d 6f 6b 75 2d 6e 75 | 6d 62 65 72 2d 6f 66 2d |omoku-nu|mber-of-|
|00003620| 68 75 6d 61 6e 2d 6d 6f | 76 65 73 20 30 20 22 59 |human-mo|ves 0 "Y|
|00003630| 6f 75 20 68 61 76 65 20 | 6e 6f 74 20 70 6c 61 79 |ou have |not play|
|00003640| 65 64 20 79 65 74 2e 2e | 2e 20 59 6f 75 72 20 6d |ed yet..|. Your m|
|00003650| 6f 76 65 20 3f 22 20 22 | 4f 6e 65 20 6d 6f 6d 65 |ove ?" "|One mome|
|00003660| 6e 74 2c 20 70 6c 65 61 | 73 65 2e 2e 2e 22 20 74 |nt, plea|se..." t|
|00003670| 20 67 6f 6d 6f 6b 75 2d | 68 75 6d 61 6e 2d 74 6f | gomoku-|human-to|
|00003680| 6f 6b 2d 62 61 63 6b 20 | 6e 75 6d 62 65 72 20 67 |ok-back |number g|
|00003690| 6f 6d 6f 6b 75 2d 74 61 | 6b 65 2d 62 61 63 6b 20 |omoku-ta|ke-back |
|000036a0| 67 6f 6d 6f 6b 75 2d 70 | 72 6f 6d 70 74 2d 66 6f |gomoku-p|rompt-fo|
|000036b0| 72 2d 6d 6f 76 65 5d 20 | 32 20 22 5c 0a 53 69 67 |r-move] |2 "\.Sig|
|000036c0| 6e 61 6c 20 74 6f 20 74 | 68 65 20 47 6f 6d 6f 6b |nal to t|he Gomok|
|000036d0| 75 20 70 72 6f 67 72 61 | 6d 20 74 68 61 74 20 79 |u progra|m that y|
|000036e0| 6f 75 20 77 69 73 68 20 | 74 6f 20 74 61 6b 65 20 |ou wish |to take |
|000036f0| 62 61 63 6b 20 79 6f 75 | 72 20 6c 61 73 74 20 6d |back you|r last m|
|00003700| 6f 76 65 2e 22 20 6e 69 | 6c 5d 29 0a 28 64 65 66 |ove." ni|l]).(def|
|00003710| 61 6c 69 61 73 20 27 67 | 6f 6d 6f 6b 75 2d 68 75 |alias 'g|omoku-hu|
|00003720| 6d 61 6e 2d 72 65 73 69 | 67 6e 73 20 23 5b 6e 69 |man-resi|gns #[ni|
|00003730| 6c 20 22 c0 20 88 09 83 | 5c 6e 00 c2 20 87 0b 84 |l ". ...|\n.. ...|
|00003740| 12 00 c4 c5 21 87 c6 c7 | 21 83 1c 00 c8 c9 21 87 |....!...|!.....!.|
|00003750| c6 ca 21 83 25 00 cb 20 | 87 c8 c9 21 87 22 20 5b |..!.%.. |...!." [|
|00003760| 67 6f 6d 6f 6b 75 2d 73 | 77 69 74 63 68 2d 74 6f |gomoku-s|witch-to|
|00003770| 2d 77 69 6e 64 6f 77 20 | 67 6f 6d 6f 6b 75 2d 65 |-window |gomoku-e|
|00003780| 6d 61 63 73 2d 69 73 2d | 63 6f 6d 70 75 74 69 6e |macs-is-|computin|
|00003790| 67 20 67 6f 6d 6f 6b 75 | 2d 63 72 61 73 68 2d 67 |g gomoku|-crash-g|
|000037a0| 61 6d 65 20 67 6f 6d 6f | 6b 75 2d 67 61 6d 65 2d |ame gomo|ku-game-|
|000037b0| 69 6e 2d 70 72 6f 67 72 | 65 73 73 20 6d 65 73 73 |in-progr|ess mess|
|000037c0| 61 67 65 20 22 54 68 65 | 72 65 20 69 73 20 6e 6f |age "The|re is no|
|000037d0| 20 67 61 6d 65 20 69 6e | 20 70 72 6f 67 72 65 73 | game in| progres|
|000037e0| 73 22 20 79 2d 6f 72 2d | 6e 2d 70 20 22 59 6f 75 |s" y-or-|n-p "You|
|000037f0| 20 6d 65 61 6e 2c 20 79 | 6f 75 20 72 65 73 69 67 | mean, y|ou resig|
|00003800| 6e 20 22 20 67 6f 6d 6f | 6b 75 2d 74 65 72 6d 69 |n " gomo|ku-termi|
|00003810| 6e 61 74 65 2d 67 61 6d | 65 20 68 75 6d 61 6e 2d |nate-gam|e human-|
|00003820| 72 65 73 69 67 6e 65 64 | 20 22 59 6f 75 20 6d 65 |resigned| "You me|
|00003830| 61 6e 2c 20 77 65 20 63 | 6f 6e 74 69 6e 75 65 20 |an, we c|ontinue |
|00003840| 22 20 67 6f 6d 6f 6b 75 | 2d 70 72 6f 6d 70 74 2d |" gomoku|-prompt-|
|00003850| 66 6f 72 2d 6d 6f 76 65 | 5d 20 32 20 22 5c 0a 53 |for-move|] 2 "\.S|
|00003860| 69 67 6e 61 6c 20 74 6f | 20 74 68 65 20 47 6f 6d |ignal to| the Gom|
|00003870| 6f 6b 75 20 70 72 6f 67 | 72 61 6d 20 74 68 61 74 |oku prog|ram that|
|00003880| 20 79 6f 75 20 6d 61 79 | 20 77 61 6e 74 20 74 6f | you may| want to|
|00003890| 20 72 65 73 69 67 6e 2e | 22 20 6e 69 6c 5d 29 0a | resign.|" nil]).|
|000038a0| 28 64 65 66 61 6c 69 61 | 73 20 27 67 6f 6d 6f 6b |(defalia|s 'gomok|
|000038b0| 75 2d 70 72 6f 6d 70 74 | 2d 66 6f 72 2d 6d 6f 76 |u-prompt|-for-mov|
|000038c0| 65 20 23 5b 6e 69 6c 20 | 22 c0 09 c2 55 83 0b 00 |e #[nil |"...U...|
|000038d0| c3 82 5c 66 00 c4 21 88 | 8a c5 20 71 29 87 22 20 |..\f..!.|.. q)." |
|000038e0| 5b 6d 65 73 73 61 67 65 | 20 67 6f 6d 6f 6b 75 2d |[message| gomoku-|
|000038f0| 6e 75 6d 62 65 72 2d 6f | 66 2d 68 75 6d 61 6e 2d |number-o|f-human-|
|00003900| 6d 6f 76 65 73 20 30 20 | 22 59 6f 75 72 20 6d 6f |moves 0 |"Your mo|
|00003910| 76 65 20 3f 20 28 6d 6f | 76 65 20 74 6f 20 61 20 |ve ? (mo|ve to a |
|00003920| 66 72 65 65 20 73 71 75 | 61 72 65 20 61 6e 64 20 |free squ|are and |
|00003930| 68 69 74 20 58 2c 20 52 | 45 54 20 2e 2e 2e 29 22 |hit X, R|ET ...)"|
|00003940| 20 22 59 6f 75 72 20 6d | 6f 76 65 20 3f 22 20 6f | "Your m|ove ?" o|
|00003950| 74 68 65 72 2d 62 75 66 | 66 65 72 5d 20 33 20 22 |ther-buf|fer] 3 "|
|00003960| 5c 0a 44 69 73 70 6c 61 | 79 20 61 20 6d 65 73 73 |\.Displa|y a mess|
|00003970| 61 67 65 20 61 73 6b 69 | 6e 67 20 66 6f 72 20 48 |age aski|ng for H|
|00003980| 75 6d 61 6e 27 73 20 6d | 6f 76 65 2e 22 5d 29 0a |uman's m|ove."]).|
|00003990| 28 64 65 66 61 6c 69 61 | 73 20 27 67 6f 6d 6f 6b |(defalia|s 'gomok|
|000039a0| 75 2d 70 72 6f 6d 70 74 | 2d 66 6f 72 2d 6f 74 68 |u-prompt|-for-oth|
|000039b0| 65 72 2d 67 61 6d 65 20 | 23 5b 6e 69 6c 20 22 c0 |er-game |#[nil ".|
|000039c0| c1 21 83 0b 00 c2 0b 5c | 66 5c 22 87 c5 c6 21 87 |.!.....\|f\"...!.|
|000039d0| 22 20 5b 79 2d 6f 72 2d | 6e 2d 70 20 22 41 6e 6f |" [y-or-|n-p "Ano|
|000039e0| 74 68 65 72 20 67 61 6d | 65 20 22 20 67 6f 6d 6f |ther gam|e " gomo|
|000039f0| 6b 75 20 67 6f 6d 6f 6b | 75 2d 62 6f 61 72 64 2d |ku gomok|u-board-|
|00003a00| 77 69 64 74 68 20 67 6f | 6d 6f 6b 75 2d 62 6f 61 |width go|moku-boa|
|00003a10| 72 64 2d 68 65 69 67 68 | 74 20 6d 65 73 73 61 67 |rd-heigh|t messag|
|00003a20| 65 20 22 43 68 69 63 6b | 65 6e 20 21 22 5d 20 33 |e "Chick|en !"] 3|
|00003a30| 20 22 5c 0a 41 73 6b 20 | 66 6f 72 20 61 6e 6f 74 | "\.Ask |for anot|
|00003a40| 68 65 72 20 67 61 6d 65 | 2c 20 61 6e 64 20 73 74 |her game|, and st|
|00003a50| 61 72 74 20 69 74 2e 22 | 5d 29 0a 28 64 65 66 61 |art it."|]).(defa|
|00003a60| 6c 69 61 73 20 27 67 6f | 6d 6f 6b 75 2d 6f 66 66 |lias 'go|moku-off|
|00003a70| 65 72 2d 61 2d 64 72 61 | 77 20 23 5b 6e 69 6c 20 |er-a-dra|w #[nil |
|00003a80| 22 c0 c1 21 86 09 00 c2 | 89 13 87 22 20 5b 79 2d |"..!....|..." [y-|
|00003a90| 6f 72 2d 6e 2d 70 20 22 | 49 20 6f 66 66 65 72 20 |or-n-p "|I offer |
|00003aa0| 79 6f 75 20 61 20 64 72 | 61 77 2e 20 44 6f 20 79 |you a dr|aw. Do y|
|00003ab0| 6f 75 20 61 63 63 65 70 | 74 20 69 74 20 22 20 74 |ou accep|t it " t|
|00003ac0| 20 67 6f 6d 6f 6b 75 2d | 68 75 6d 61 6e 2d 72 65 | gomoku-|human-re|
|00003ad0| 66 75 73 65 64 2d 64 72 | 61 77 5d 20 32 20 22 5c |fused-dr|aw] 2 "\|
|00003ae0| 0a 4f 66 66 65 72 20 61 | 20 64 72 61 77 20 61 6e |.Offer a| draw an|
|00003af0| 64 20 72 65 74 75 72 6e | 20 54 20 69 66 20 48 75 |d return| T if Hu|
|00003b00| 6d 61 6e 20 61 63 63 65 | 70 74 65 64 20 69 74 2e |man acce|pted it.|
|00003b10| 22 5d 29 0a 28 64 65 66 | 63 6f 6e 73 74 20 67 6f |"]).(def|const go|
|00003b20| 6d 6f 6b 75 2d 73 71 75 | 61 72 65 2d 77 69 64 74 |moku-squ|are-widt|
|00003b30| 68 20 34 20 22 5c 0a 2a | 48 6f 72 69 7a 6f 6e 74 |h 4 "\.*|Horizont|
|00003b40| 61 6c 20 73 70 61 63 69 | 6e 67 20 62 65 74 77 65 |al spaci|ng betwe|
|00003b50| 65 6e 20 73 71 75 61 72 | 65 73 20 6f 6e 20 74 68 |en squar|es on th|
|00003b60| 65 20 47 6f 6d 6f 6b 75 | 20 62 6f 61 72 64 2e 22 |e Gomoku| board."|
|00003b70| 29 0a 28 64 65 66 63 6f | 6e 73 74 20 67 6f 6d 6f |).(defco|nst gomo|
|00003b80| 6b 75 2d 73 71 75 61 72 | 65 2d 68 65 69 67 68 74 |ku-squar|e-height|
|00003b90| 20 32 20 22 5c 0a 2a 56 | 65 72 74 69 63 61 6c 20 | 2 "\.*V|ertical |
|00003ba0| 73 70 61 63 69 6e 67 20 | 62 65 74 77 65 65 6e 20 |spacing |between |
|00003bb0| 73 71 75 61 72 65 73 20 | 6f 6e 20 74 68 65 20 47 |squares |on the G|
|00003bc0| 6f 6d 6f 6b 75 20 62 6f | 61 72 64 2e 22 29 0a 28 |omoku bo|ard.").(|
|00003bd0| 64 65 66 63 6f 6e 73 74 | 20 67 6f 6d 6f 6b 75 2d |defconst| gomoku-|
|00003be0| 78 2d 6f 66 66 73 65 74 | 20 33 20 22 5c 0a 2a 4e |x-offset| 3 "\.*N|
|00003bf0| 75 6d 62 65 72 20 6f 66 | 20 63 6f 6c 75 6d 6e 73 |umber of| columns|
|00003c00| 20 62 65 74 77 65 65 6e | 20 74 68 65 20 47 6f 6d | between| the Gom|
|00003c10| 6f 6b 75 20 62 6f 61 72 | 64 20 61 6e 64 20 74 68 |oku boar|d and th|
|00003c20| 65 20 73 69 64 65 20 6f | 66 20 74 68 65 20 77 69 |e side o|f the wi|
|00003c30| 6e 64 6f 77 2e 22 29 0a | 28 64 65 66 63 6f 6e 73 |ndow.").|(defcons|
|00003c40| 74 20 67 6f 6d 6f 6b 75 | 2d 79 2d 6f 66 66 73 65 |t gomoku|-y-offse|
|00003c50| 74 20 31 20 22 5c 0a 2a | 4e 75 6d 62 65 72 20 6f |t 1 "\.*|Number o|
|00003c60| 66 20 6c 69 6e 65 73 20 | 62 65 74 77 65 65 6e 20 |f lines |between |
|00003c70| 74 68 65 20 47 6f 6d 6f | 6b 75 20 62 6f 61 72 64 |the Gomo|ku board|
|00003c80| 20 61 6e 64 20 74 68 65 | 20 74 6f 70 20 6f 66 20 | and the| top of |
|00003c90| 74 68 65 20 77 69 6e 64 | 6f 77 2e 22 29 0a 28 64 |the wind|ow.").(d|
|00003ca0| 65 66 61 6c 69 61 73 20 | 27 67 6f 6d 6f 6b 75 2d |efalias |'gomoku-|
|00003cb0| 6d 61 78 2d 77 69 64 74 | 68 20 23 5b 6e 69 6c 20 |max-widt|h #[nil |
|00003cc0| 22 c0 c1 20 21 5c 6e 5a | 5c 6e 5a c3 5a 5c 66 a5 |".. !\nZ|\nZ.Z\f.|
|00003cd0| 54 87 22 20 5b 77 69 6e | 64 6f 77 2d 77 69 64 74 |T." [win|dow-widt|
|00003ce0| 68 20 73 65 6c 65 63 74 | 65 64 2d 77 69 6e 64 6f |h select|ed-windo|
|00003cf0| 77 20 67 6f 6d 6f 6b 75 | 2d 78 2d 6f 66 66 73 65 |w gomoku|-x-offse|
|00003d00| 74 20 31 20 67 6f 6d 6f | 6b 75 2d 73 71 75 61 72 |t 1 gomo|ku-squar|
|00003d10| 65 2d 77 69 64 74 68 5d | 20 32 20 22 5c 0a 4c 61 |e-width]| 2 "\.La|
|00003d20| 72 67 65 73 74 20 70 6f | 73 73 69 62 6c 65 20 62 |rgest po|ssible b|
|00003d30| 6f 61 72 64 20 77 69 64 | 74 68 20 66 6f 72 20 74 |oard wid|th for t|
|00003d40| 68 65 20 63 75 72 72 65 | 6e 74 20 77 69 6e 64 6f |he curre|nt windo|
|00003d50| 77 2e 22 5d 29 0a 28 64 | 65 66 61 6c 69 61 73 20 |w."]).(d|efalias |
|00003d60| 27 67 6f 6d 6f 6b 75 2d | 6d 61 78 2d 68 65 69 67 |'gomoku-|max-heig|
|00003d70| 68 74 20 23 5b 6e 69 6c | 20 22 c0 c1 20 21 5c 6e |ht #[nil| ".. !\n|
|00003d80| 5a 5c 6e 5a c3 5a 5c 66 | a5 54 87 22 20 5b 77 69 |Z\nZ.Z\f|.T." [wi|
|00003d90| 6e 64 6f 77 2d 68 65 69 | 67 68 74 20 73 65 6c 65 |ndow-hei|ght sele|
|00003da0| 63 74 65 64 2d 77 69 6e | 64 6f 77 20 67 6f 6d 6f |cted-win|dow gomo|
|00003db0| 6b 75 2d 79 2d 6f 66 66 | 73 65 74 20 32 20 67 6f |ku-y-off|set 2 go|
|00003dc0| 6d 6f 6b 75 2d 73 71 75 | 61 72 65 2d 68 65 69 67 |moku-squ|are-heig|
|00003dd0| 68 74 5d 20 32 20 22 5c | 0a 4c 61 72 67 65 73 74 |ht] 2 "\|.Largest|
|00003de0| 20 70 6f 73 73 69 62 6c | 65 20 62 6f 61 72 64 20 | possibl|e board |
|00003df0| 68 65 69 67 68 74 20 66 | 6f 72 20 74 68 65 20 63 |height f|or the c|
|00003e00| 75 72 72 65 6e 74 20 77 | 69 6e 64 6f 77 2e 22 5d |urrent w|indow."]|
|00003e10| 29 0a 28 64 65 66 61 6c | 69 61 73 20 27 67 6f 6d |).(defal|ias 'gom|
|00003e20| 6f 6b 75 2d 70 6f 69 6e | 74 2d 78 20 23 5b 6e 69 |oku-poin|t-x #[ni|
|00003e30| 6c 20 22 69 08 5a 89 19 | c2 59 85 1e 00 09 0b a6 |l "i.Z..|.Y......|
|00003e40| c2 55 85 1e 00 09 0b a5 | 54 89 11 5c 66 58 85 1e |.U......|T..\fX..|
|00003e50| 00 09 29 87 22 20 5b 67 | 6f 6d 6f 6b 75 2d 78 2d |..)." [g|omoku-x-|
|00003e60| 6f 66 66 73 65 74 20 63 | 6f 6c 20 30 20 67 6f 6d |offset c|ol 0 gom|
|00003e70| 6f 6b 75 2d 73 71 75 61 | 72 65 2d 77 69 64 74 68 |oku-squa|re-width|
|00003e80| 20 67 6f 6d 6f 6b 75 2d | 62 6f 61 72 64 2d 77 69 | gomoku-|board-wi|
|00003e90| 64 74 68 5d 20 33 20 22 | 5c 0a 52 65 74 75 72 6e |dth] 3 "|\.Return|
|00003ea0| 20 74 68 65 20 62 6f 61 | 72 64 20 63 6f 6c 75 6d | the boa|rd colum|
|00003eb0| 6e 20 77 68 65 72 65 20 | 70 6f 69 6e 74 20 69 73 |n where |point is|
|00003ec0| 2c 20 6f 72 20 6e 69 6c | 20 69 66 20 69 74 20 69 |, or nil| if it i|
|00003ed0| 73 20 6e 6f 74 20 61 20 | 62 6f 61 72 64 20 63 6f |s not a |board co|
|00003ee0| 6c 75 6d 6e 2e 22 5d 29 | 0a 28 64 65 66 61 6c 69 |lumn."])|.(defali|
|00003ef0| 61 73 20 27 67 6f 6d 6f | 6b 75 2d 70 6f 69 6e 74 |as 'gomo|ku-point|
|00003f00| 2d 79 20 23 5b 6e 69 6c | 20 22 c0 c1 60 5c 22 5c |-y #[nil| "..`\"\|
|00003f10| 6e 5a c1 5a 89 1b c4 59 | 85 24 00 0b 0d a6 c4 55 |nZ.Z...Y|.$.....U|
|00003f20| 85 24 00 0b 0d a5 54 89 | 13 0e 06 58 85 24 00 0b |.$....T.|...X.$..|
|00003f30| 29 87 22 20 5b 63 6f 75 | 6e 74 2d 6c 69 6e 65 73 |)." [cou|nt-lines|
|00003f40| 20 31 20 67 6f 6d 6f 6b | 75 2d 79 2d 6f 66 66 73 | 1 gomok|u-y-offs|
|00003f50| 65 74 20 72 6f 77 20 30 | 20 67 6f 6d 6f 6b 75 2d |et row 0| gomoku-|
|00003f60| 73 71 75 61 72 65 2d 68 | 65 69 67 68 74 20 67 6f |square-h|eight go|
|00003f70| 6d 6f 6b 75 2d 62 6f 61 | 72 64 2d 68 65 69 67 68 |moku-boa|rd-heigh|
|00003f80| 74 5d 20 34 20 22 5c 0a | 52 65 74 75 72 6e 20 74 |t] 4 "\.|Return t|
|00003f90| 68 65 20 62 6f 61 72 64 | 20 72 6f 77 20 77 68 65 |he board| row whe|
|00003fa0| 72 65 20 70 6f 69 6e 74 | 20 69 73 2c 20 6f 72 20 |re point| is, or |
|00003fb0| 6e 69 6c 20 69 66 20 69 | 74 20 69 73 20 6e 6f 74 |nil if i|t is not|
|00003fc0| 20 61 20 62 6f 61 72 64 | 20 72 6f 77 2e 22 5d 29 | a board| row."])|
|00003fd0| 0a 28 64 65 66 61 6c 69 | 61 73 20 27 67 6f 6d 6f |.(defali|as 'gomo|
|00003fe0| 6b 75 2d 70 6f 69 6e 74 | 2d 73 71 75 61 72 65 20 |ku-point|-square |
|00003ff0| 23 5b 6e 69 6c 20 22 c0 | 89 19 1a c3 20 89 12 85 |#[nil ".|.... ...|
|00004000| 16 00 c4 20 89 11 85 16 | 00 c5 5c 6e 09 5c 22 2a |... ....|..\n.\"*|
|00004010| 87 22 20 5b 6e 69 6c 20 | 79 20 78 20 67 6f 6d 6f |." [nil |y x gomo|
|00004020| 6b 75 2d 70 6f 69 6e 74 | 2d 78 20 67 6f 6d 6f 6b |ku-point|-x gomok|
|00004030| 75 2d 70 6f 69 6e 74 2d | 79 20 67 6f 6d 6f 6b 75 |u-point-|y gomoku|
|00004040| 2d 78 79 2d 74 6f 2d 69 | 6e 64 65 78 5d 20 33 20 |-xy-to-i|ndex] 3 |
|00004050| 22 5c 0a 52 65 74 75 72 | 6e 20 74 68 65 20 69 6e |"\.Retur|n the in|
|00004060| 64 65 78 20 6f 66 20 74 | 68 65 20 73 71 75 61 72 |dex of t|he squar|
|00004070| 65 20 70 6f 69 6e 74 20 | 69 73 20 6f 6e 2c 20 6f |e point |is on, o|
|00004080| 72 20 6e 69 6c 20 69 66 | 20 6e 6f 74 20 6f 6e 20 |r nil if| not on |
|00004090| 74 68 65 20 62 6f 61 72 | 64 2e 22 5d 29 0a 28 64 |the boar|d."]).(d|
|000040a0| 65 66 61 6c 69 61 73 20 | 27 67 6f 6d 6f 6b 75 2d |efalias |'gomoku-|
|000040b0| 67 6f 74 6f 2d 73 71 75 | 61 72 65 20 23 5b 28 69 |goto-squ|are #[(i|
|000040c0| 6e 64 65 78 29 20 22 c0 | c1 5c 6e 21 c3 5c 6e 21 |ndex) ".|.\n!.\n!|
|000040d0| 5c 22 87 22 20 5b 67 6f | 6d 6f 6b 75 2d 67 6f 74 |\"." [go|moku-got|
|000040e0| 6f 2d 78 79 20 67 6f 6d | 6f 6b 75 2d 69 6e 64 65 |o-xy gom|oku-inde|
|000040f0| 78 2d 74 6f 2d 78 20 69 | 6e 64 65 78 20 67 6f 6d |x-to-x i|ndex gom|
|00004100| 6f 6b 75 2d 69 6e 64 65 | 78 2d 74 6f 2d 79 5d 20 |oku-inde|x-to-y] |
|00004110| 34 20 22 5c 0a 4d 6f 76 | 65 20 70 6f 69 6e 74 20 |4 "\.Mov|e point |
|00004120| 74 6f 20 73 71 75 61 72 | 65 20 6e 75 6d 62 65 72 |to squar|e number|
|00004130| 20 49 4e 44 45 58 2e 22 | 5d 29 0a 28 64 65 66 61 | INDEX."|]).(defa|
|00004140| 6c 69 61 73 20 27 67 6f | 6d 6f 6b 75 2d 67 6f 74 |lias 'go|moku-got|
|00004150| 6f 2d 78 79 20 23 5b 28 | 78 20 79 29 20 22 c0 09 |o-xy #[(|x y) "..|
|00004160| 5c 6e 0b 53 5f c4 5c 5c | 5c 5c 21 88 c5 0e 06 0e |\n.S_.\\|\\!.....|
|00004170| 07 0e 08 53 5f 5c 5c 21 | 87 22 20 5b 67 6f 74 6f |...S_\\!|." [goto|
|00004180| 2d 6c 69 6e 65 20 67 6f | 6d 6f 6b 75 2d 79 2d 6f |-line go|moku-y-o|
|00004190| 66 66 73 65 74 20 67 6f | 6d 6f 6b 75 2d 73 71 75 |ffset go|moku-squ|
|000041a0| 61 72 65 2d 68 65 69 67 | 68 74 20 79 20 31 20 6d |are-heig|ht y 1 m|
|000041b0| 6f 76 65 2d 74 6f 2d 63 | 6f 6c 75 6d 6e 20 67 6f |ove-to-c|olumn go|
|000041c0| 6d 6f 6b 75 2d 78 2d 6f | 66 66 73 65 74 20 67 6f |moku-x-o|ffset go|
|000041d0| 6d 6f 6b 75 2d 73 71 75 | 61 72 65 2d 77 69 64 74 |moku-squ|are-widt|
|000041e0| 68 20 78 5d 20 34 20 22 | 5c 0a 4d 6f 76 65 20 70 |h x] 4 "|\.Move p|
|000041f0| 6f 69 6e 74 20 74 6f 20 | 73 71 75 61 72 65 20 61 |oint to |square a|
|00004200| 74 20 58 2c 20 59 20 63 | 6f 6f 72 64 73 2e 22 5d |t X, Y c|oords."]|
|00004210| 29 0a 28 64 65 66 61 6c | 69 61 73 20 27 67 6f 6d |).(defal|ias 'gom|
|00004220| 6f 6b 75 2d 70 6c 6f 74 | 2d 73 71 75 61 72 65 20 |oku-plot|-square |
|00004230| 23 5b 28 73 71 75 61 72 | 65 20 76 61 6c 75 65 29 |#[(squar|e value)|
|00004240| 20 22 c0 09 21 88 c2 0b | c4 55 83 0f 00 c5 82 1a | "..!...|.U......|
|00004250| 00 0b c6 55 83 19 00 c7 | 82 1a 00 c8 21 88 c9 ca |...U....|....!...|
|00004260| 21 87 22 20 5b 67 6f 6d | 6f 6b 75 2d 67 6f 74 6f |!." [gom|oku-goto|
|00004270| 2d 73 71 75 61 72 65 20 | 73 71 75 61 72 65 20 67 |-square |square g|
|00004280| 6f 6d 6f 6b 75 2d 70 75 | 74 2d 63 68 61 72 20 76 |omoku-pu|t-char v|
|00004290| 61 6c 75 65 20 31 20 38 | 38 20 36 20 37 39 20 34 |alue 1 8|8 6 79 4|
|000042a0| 36 20 73 69 74 2d 66 6f | 72 20 30 5d 20 33 20 22 |6 sit-fo|r 0] 3 "|
|000042b0| 5c 0a 44 72 61 77 20 27 | 58 27 2c 20 27 4f 27 20 |\.Draw '|X', 'O' |
|000042c0| 6f 72 20 27 2e 27 20 6f | 6e 20 53 51 55 41 52 45 |or '.' o|n SQUARE|
|000042d0| 20 28 64 65 70 65 6e 64 | 69 6e 67 20 6f 6e 20 56 | (depend|ing on V|
|000042e0| 41 4c 55 45 29 2c 20 6c | 65 61 76 65 20 70 6f 69 |ALUE), l|eave poi|
|000042f0| 6e 74 20 74 68 65 72 65 | 2e 22 5d 29 0a 28 64 65 |nt there|."]).(de|
|00004300| 66 61 6c 69 61 73 20 27 | 67 6f 6d 6f 6b 75 2d 70 |falias '|gomoku-p|
|00004310| 75 74 2d 63 68 61 72 20 | 23 5b 28 63 68 61 72 29 |ut-char |#[(char)|
|00004320| 20 22 c0 19 5c 6e 63 88 | c3 c4 21 88 c5 c4 21 29 | "..\nc.|..!...!)|
|00004330| 87 22 20 5b 74 20 69 6e | 68 69 62 69 74 2d 72 65 |." [t in|hibit-re|
|00004340| 61 64 2d 6f 6e 6c 79 20 | 63 68 61 72 20 64 65 6c |ad-only |char del|
|00004350| 65 74 65 2d 63 68 61 72 | 20 31 20 62 61 63 6b 77 |ete-char| 1 backw|
|00004360| 61 72 64 2d 63 68 61 72 | 5d 20 32 20 22 5c 0a 44 |ard-char|] 2 "\.D|
|00004370| 72 61 77 20 43 48 41 52 | 20 6f 6e 20 74 68 65 20 |raw CHAR| on the |
|00004380| 47 6f 6d 6f 6b 75 20 73 | 63 72 65 65 6e 2e 22 5d |Gomoku s|creen."]|
|00004390| 29 0a 28 64 65 66 61 6c | 69 61 73 20 27 67 6f 6d |).(defal|ias 'gom|
|000043a0| 6f 6b 75 2d 69 6e 69 74 | 2d 64 69 73 70 6c 61 79 |oku-init|-display|
|000043b0| 20 23 5b 28 6e 20 6d 29 | 20 22 c0 70 21 88 c1 1a | #[(n m)| ".p!...|
|000043c0| c3 20 88 c4 89 89 89 1d | 1e 06 1e 07 1e 08 c9 0e |. ......|........|
|000043d0| 5c 6e 53 cb 5c 22 cc 50 | 16 08 cd ce cf 0e 10 53 |\nS.\".P|.......S|
|000043e0| 0e 08 5c 22 5c 22 16 08 | c9 0e 11 cb 5c 22 cc 0e |..\"\"..|....\"..|
|000043f0| 08 d2 52 16 08 c9 0e 11 | 0e 10 53 0e 5c 6e 5f d3 |..R.....|..S.\n_.|
|00004400| 5c 5c 5c 5c cb 5c 22 89 | 16 07 d2 50 16 07 cd ce |\\\\.\".|...P....|
|00004410| cf 0e 14 53 0e 07 5c 22 | 5c 22 89 16 06 0e 08 50 |...S..\"|\".....P|
|00004420| 16 06 cd ce cf 0e 15 53 | 0e 06 5c 22 5c 22 16 06 |.......S|..\"\"..|
|00004430| cd ce cf 0e 16 0e 07 5c | 22 5c 22 89 15 0e 08 0e |.......\|"\".....|
|00004440| 06 b1 03 88 2c d7 0e 10 | 54 d8 a5 0e 15 54 d8 a5 |....,...|T....T..|
|00004450| 5c 22 88 d9 da 21 29 87 | 22 20 5b 62 75 66 66 65 |\"...!).|" [buffe|
|00004460| 72 2d 64 69 73 61 62 6c | 65 2d 75 6e 64 6f 20 74 |r-disabl|e-undo t|
|00004470| 20 69 6e 68 69 62 69 74 | 2d 72 65 61 64 2d 6f 6e | inhibit|-read-on|
|00004480| 6c 79 20 65 72 61 73 65 | 2d 62 75 66 66 65 72 20 |ly erase|-buffer |
|00004490| 6e 69 6c 20 73 74 72 69 | 6e 67 34 20 73 74 72 69 |nil stri|ng4 stri|
|000044a0| 6e 67 33 20 73 74 72 69 | 6e 67 32 20 73 74 72 69 |ng3 stri|ng2 stri|
|000044b0| 6e 67 31 20 6d 61 6b 65 | 2d 73 74 72 69 6e 67 20 |ng1 make|-string |
|000044c0| 67 6f 6d 6f 6b 75 2d 73 | 71 75 61 72 65 2d 77 69 |gomoku-s|quare-wi|
|000044d0| 64 74 68 20 33 32 20 22 | 2e 22 20 61 70 70 6c 79 |dth 32 "|." apply|
|000044e0| 20 63 6f 6e 63 61 74 20 | 6d 61 6b 65 2d 6c 69 73 | concat |make-lis|
|000044f0| 74 20 6e 20 67 6f 6d 6f | 6b 75 2d 78 2d 6f 66 66 |t n gomo|ku-x-off|
|00004500| 73 65 74 20 22 5c 6e 22 | 20 31 20 67 6f 6d 6f 6b |set "\n"| 1 gomok|
|00004510| 75 2d 73 71 75 61 72 65 | 2d 68 65 69 67 68 74 20 |u-square|-height |
|00004520| 6d 20 67 6f 6d 6f 6b 75 | 2d 79 2d 6f 66 66 73 65 |m gomoku|-y-offse|
|00004530| 74 20 67 6f 6d 6f 6b 75 | 2d 67 6f 74 6f 2d 78 79 |t gomoku|-goto-xy|
|00004540| 20 32 20 73 69 74 2d 66 | 6f 72 20 30 5d 20 36 20 | 2 sit-f|or 0] 6 |
|00004550| 22 5c 0a 44 69 73 70 6c | 61 79 20 61 6e 20 4e 20 |"\.Displ|ay an N |
|00004560| 62 79 20 4d 20 47 6f 6d | 6f 6b 75 20 62 6f 61 72 |by M Gom|oku boar|
|00004570| 64 2e 22 5d 29 0a 28 64 | 65 66 61 6c 69 61 73 20 |d."]).(d|efalias |
|00004580| 27 67 6f 6d 6f 6b 75 2d | 64 69 73 70 6c 61 79 2d |'gomoku-|display-|
|00004590| 73 74 61 74 69 73 74 69 | 63 73 20 23 5b 6e 69 6c |statisti|cs #[nil|
|000045a0| 20 22 08 c1 55 84 0f 00 | c2 c3 5c 66 0d 08 24 82 | "..U...|..\f..$.|
|000045b0| 35 00 0d c1 55 84 1d 00 | c2 c6 5c 66 0d 23 82 35 |5...U...|..\f.#.5|
|000045c0| 00 5c 66 c1 55 83 27 00 | c7 82 35 00 5c 66 c8 55 |.\f.U.'.|..5.\f.U|
|000045d0| 83 31 00 c9 82 35 00 c2 | ca 5c 66 5c 22 16 0b cc |.1...5..|.\f\"...|
|000045e0| cd 20 21 87 22 20 5b 67 | 6f 6d 6f 6b 75 2d 6e 75 |. !." [g|omoku-nu|
|000045f0| 6d 62 65 72 2d 6f 66 2d | 64 72 61 77 73 20 30 20 |mber-of-|draws 0 |
|00004600| 66 6f 72 6d 61 74 20 22 | 3a 20 57 6f 6e 20 25 64 |format "|: Won %d|
|00004610| 2c 20 6c 6f 73 74 20 25 | 64 2c 20 64 72 65 77 20 |, lost %|d, drew |
|00004620| 25 64 22 20 67 6f 6d 6f | 6b 75 2d 6e 75 6d 62 65 |%d" gomo|ku-numbe|
|00004630| 72 2d 6f 66 2d 77 69 6e | 73 20 67 6f 6d 6f 6b 75 |r-of-win|s gomoku|
|00004640| 2d 6e 75 6d 62 65 72 2d | 6f 66 2d 6c 6f 73 73 65 |-number-|of-losse|
|00004650| 73 20 22 3a 20 57 6f 6e | 20 25 64 2c 20 6c 6f 73 |s ": Won| %d, los|
|00004660| 74 20 25 64 22 20 22 22 | 20 31 20 22 3a 20 41 6c |t %d" ""| 1 ": Al|
|00004670| 72 65 61 64 79 20 77 6f | 6e 20 6f 6e 65 22 20 22 |ready wo|n one" "|
|00004680| 3a 20 57 6f 6e 20 25 64 | 20 69 6e 20 61 20 72 6f |: Won %d| in a ro|
|00004690| 77 22 20 6d 6f 64 65 2d | 6c 69 6e 65 2d 70 72 6f |w" mode-|line-pro|
|000046a0| 63 65 73 73 20 73 65 74 | 2d 62 75 66 66 65 72 2d |cess set|-buffer-|
|000046b0| 6d 6f 64 69 66 69 65 64 | 2d 70 20 62 75 66 66 65 |modified|-p buffe|
|000046c0| 72 2d 6d 6f 64 69 66 69 | 65 64 2d 70 5d 20 35 20 |r-modifi|ed-p] 5 |
|000046d0| 22 5c 0a 4f 62 6e 6f 78 | 69 6f 75 73 6c 79 20 64 |"\.Obnox|iously d|
|000046e0| 69 73 70 6c 61 79 20 73 | 6f 6d 65 20 73 74 61 74 |isplay s|ome stat|
|000046f0| 69 73 74 69 63 73 20 61 | 62 6f 75 74 20 70 72 65 |istics a|bout pre|
|00004700| 76 69 6f 75 73 20 67 61 | 6d 65 73 20 69 6e 20 6d |vious ga|mes in m|
|00004710| 6f 64 65 20 6c 69 6e 65 | 2e 22 5d 29 0a 28 64 65 |ode line|."]).(de|
|00004720| 66 61 6c 69 61 73 20 27 | 67 6f 6d 6f 6b 75 2d 73 |falias '|gomoku-s|
|00004730| 77 69 74 63 68 2d 74 6f | 2d 77 69 6e 64 6f 77 20 |witch-to|-window |
|00004740| 23 5b 6e 69 6c 20 22 c0 | c1 21 89 1a 83 0e 00 c3 |#[nil ".|.!......|
|00004750| 5c 6e 21 82 1b 00 5c 66 | 83 15 00 c5 20 88 c3 c1 |\n!...\f|.... ...|
|00004760| 21 88 c6 20 29 87 22 20 | 5b 67 65 74 2d 62 75 66 |!.. )." |[get-buf|
|00004770| 66 65 72 20 22 2a 47 6f | 6d 6f 6b 75 2a 22 20 62 |fer "*Go|moku*" b|
|00004780| 75 66 66 20 73 77 69 74 | 63 68 2d 74 6f 2d 62 75 |uff swit|ch-to-bu|
|00004790| 66 66 65 72 20 67 6f 6d | 6f 6b 75 2d 67 61 6d 65 |ffer gom|oku-game|
|000047a0| 2d 69 6e 2d 70 72 6f 67 | 72 65 73 73 20 67 6f 6d |-in-prog|ress gom|
|000047b0| 6f 6b 75 2d 63 72 61 73 | 68 2d 67 61 6d 65 20 67 |oku-cras|h-game g|
|000047c0| 6f 6d 6f 6b 75 2d 6d 6f | 64 65 5d 20 33 20 22 5c |omoku-mo|de] 3 "\|
|000047d0| 0a 46 69 6e 64 20 6f 72 | 20 63 72 65 61 74 65 20 |.Find or| create |
|000047e0| 74 68 65 20 47 6f 6d 6f | 6b 75 20 62 75 66 66 65 |the Gomo|ku buffe|
|000047f0| 72 2c 20 61 6e 64 20 64 | 69 73 70 6c 61 79 20 69 |r, and d|isplay i|
|00004800| 74 2e 22 20 6e 69 6c 5d | 29 0a 28 64 65 66 76 61 |t." nil]|).(defva|
|00004810| 72 20 67 6f 6d 6f 6b 75 | 2d 77 69 6e 6e 69 6e 67 |r gomoku|-winning|
|00004820| 2d 71 74 75 70 6c 65 2d | 62 65 67 20 6e 69 6c 20 |-qtuple-|beg nil |
|00004830| 22 5c 0a 46 69 72 73 74 | 20 73 71 75 61 72 65 20 |"\.First| square |
|00004840| 6f 66 20 74 68 65 20 77 | 69 6e 6e 69 6e 67 20 71 |of the w|inning q|
|00004850| 74 75 70 6c 65 2e 22 29 | 0a 28 64 65 66 76 61 72 |tuple.")|.(defvar|
|00004860| 20 67 6f 6d 6f 6b 75 2d | 77 69 6e 6e 69 6e 67 2d | gomoku-|winning-|
|00004870| 71 74 75 70 6c 65 2d 65 | 6e 64 20 6e 69 6c 20 22 |qtuple-e|nd nil "|
|00004880| 5c 0a 4c 61 73 74 20 73 | 71 75 61 72 65 20 6f 66 |\.Last s|quare of|
|00004890| 20 74 68 65 20 77 69 6e | 6e 69 6e 67 20 71 74 75 | the win|ning qtu|
|000048a0| 70 6c 65 2e 22 29 0a 28 | 64 65 66 76 61 72 20 67 |ple.").(|defvar g|
|000048b0| 6f 6d 6f 6b 75 2d 77 69 | 6e 6e 69 6e 67 2d 71 74 |omoku-wi|nning-qt|
|000048c0| 75 70 6c 65 2d 64 78 20 | 6e 69 6c 20 22 5c 0a 44 |uple-dx |nil "\.D|
|000048d0| 69 72 65 63 74 69 6f 6e | 20 6f 66 20 74 68 65 20 |irection| of the |
|000048e0| 77 69 6e 6e 69 6e 67 20 | 71 74 75 70 6c 65 20 28 |winning |qtuple (|
|000048f0| 61 6c 6f 6e 67 20 74 68 | 65 20 58 20 61 78 69 73 |along th|e X axis|
|00004900| 29 2e 22 29 0a 28 64 65 | 66 76 61 72 20 67 6f 6d |).").(de|fvar gom|
|00004910| 6f 6b 75 2d 77 69 6e 6e | 69 6e 67 2d 71 74 75 70 |oku-winn|ing-qtup|
|00004920| 6c 65 2d 64 79 20 6e 69 | 6c 20 22 5c 0a 44 69 72 |le-dy ni|l "\.Dir|
|00004930| 65 63 74 69 6f 6e 20 6f | 66 20 74 68 65 20 77 69 |ection o|f the wi|
|00004940| 6e 6e 69 6e 67 20 71 74 | 75 70 6c 65 20 28 61 6c |nning qt|uple (al|
|00004950| 6f 6e 67 20 74 68 65 20 | 59 20 61 78 69 73 29 2e |ong the |Y axis).|
|00004960| 22 29 0a 28 64 65 66 61 | 6c 69 61 73 20 27 67 6f |").(defa|lias 'go|
|00004970| 6d 6f 6b 75 2d 66 69 6e | 64 2d 66 69 6c 6c 65 64 |moku-fin|d-filled|
|00004980| 2d 71 74 75 70 6c 65 20 | 23 5b 28 73 71 75 61 72 |-qtuple |#[(squar|
|00004990| 65 20 76 61 6c 75 65 29 | 20 22 c0 09 5c 6e c3 c4 |e value)| "..\n..|
|000049a0| 24 86 21 00 c0 09 5c 6e | c4 c3 24 86 21 00 c0 09 |$.!...\n|..$.!...|
|000049b0| 5c 6e c3 89 24 86 21 00 | c0 09 5c 6e c5 c3 24 87 |\n..$.!.|..\n..$.|
|000049c0| 22 20 5b 67 6f 6d 6f 6b | 75 2d 63 68 65 63 6b 2d |" [gomok|u-check-|
|000049d0| 66 69 6c 6c 65 64 2d 71 | 74 75 70 6c 65 20 73 71 |filled-q|tuple sq|
|000049e0| 75 61 72 65 20 76 61 6c | 75 65 20 31 20 30 20 2d |uare val|ue 1 0 -|
|000049f0| 31 5d 20 35 20 22 5c 0a | 52 65 74 75 72 6e 20 54 |1] 5 "\.|Return T|
|00004a00| 20 69 66 20 53 51 55 41 | 52 45 20 62 65 6c 6f 6e | if SQUA|RE belon|
|00004a10| 67 73 20 74 6f 20 61 20 | 71 74 75 70 6c 65 20 66 |gs to a |qtuple f|
|00004a20| 69 6c 6c 65 64 20 77 69 | 74 68 20 56 41 4c 55 45 |illed wi|th VALUE|
|00004a30| 73 2e 22 5d 29 0a 28 64 | 65 66 61 6c 69 61 73 20 |s."]).(d|efalias |
|00004a40| 27 67 6f 6d 6f 6b 75 2d | 63 68 65 63 6b 2d 66 69 |'gomoku-|check-fi|
|00004a50| 6c 6c 65 64 2d 71 74 75 | 70 6c 65 20 23 5b 28 73 |lled-qtu|ple #[(s|
|00004a60| 71 75 61 72 65 20 76 61 | 6c 75 65 20 64 78 20 64 |quare va|lue dx d|
|00004a70| 79 29 20 22 c0 89 09 89 | c2 0b 5c 66 5c 22 c5 1e |y) "....|..\f\"..|
|00004a80| 06 1e 07 1e 08 1e 09 1e | 5c 6e 89 1e 0b cc 56 83 |........|\n....V.|
|00004a90| 35 00 0e 0d 0e 0e 0e 09 | 0e 07 5a 89 16 09 48 55 |5.......|..Z...HU|
|00004aa0| 83 35 00 0e 0b 53 89 16 | 0b 82 16 00 0e 0b cf 5c |.5...S..|.......\|
|00004ab0| 5c 16 06 0e 5c 6e 0e 06 | 57 83 5d 00 0e 0d 0e 0e |\...\n..|W.].....|
|00004ac0| 0e 08 0e 07 5c 5c 89 16 | 08 48 55 83 5d 00 0e 5c |....\\..|.HU.]..\|
|00004ad0| 6e 54 89 16 5c 6e 82 3d | 00 0e 5c 6e 0e 06 55 85 |nT..\n.=|..\n..U.|
|00004ae0| 7e 00 09 0e 0b 0e 07 5f | 5c 5c 16 10 09 0e 5c 6e |~......_|\\....\n|
|00004af0| 0e 07 5f 5c 5c 16 11 0b | 16 12 5c 66 16 13 d4 2e |.._\\...|..\f....|
|00004b00| 06 87 22 20 5b 30 20 73 | 71 75 61 72 65 20 67 6f |.." [0 s|quare go|
|00004b10| 6d 6f 6b 75 2d 78 79 2d | 74 6f 2d 69 6e 64 65 78 |moku-xy-|to-index|
|00004b20| 20 64 78 20 64 79 20 6e | 69 6c 20 61 2b 34 20 64 | dx dy n|il a+4 d|
|00004b30| 65 70 6c 20 72 69 67 68 | 74 20 6c 65 66 74 20 62 |epl righ|t left b|
|00004b40| 20 61 20 2d 34 20 76 61 | 6c 75 65 20 67 6f 6d 6f | a -4 va|lue gomo|
|00004b50| 6b 75 2d 62 6f 61 72 64 | 20 34 20 67 6f 6d 6f 6b |ku-board| 4 gomok|
|00004b60| 75 2d 77 69 6e 6e 69 6e | 67 2d 71 74 75 70 6c 65 |u-winnin|g-qtuple|
|00004b70| 2d 62 65 67 20 67 6f 6d | 6f 6b 75 2d 77 69 6e 6e |-beg gom|oku-winn|
|00004b80| 69 6e 67 2d 71 74 75 70 | 6c 65 2d 65 6e 64 20 67 |ing-qtup|le-end g|
|00004b90| 6f 6d 6f 6b 75 2d 77 69 | 6e 6e 69 6e 67 2d 71 74 |omoku-wi|nning-qt|
|00004ba0| 75 70 6c 65 2d 64 78 20 | 67 6f 6d 6f 6b 75 2d 77 |uple-dx |gomoku-w|
|00004bb0| 69 6e 6e 69 6e 67 2d 71 | 74 75 70 6c 65 2d 64 79 |inning-q|tuple-dy|
|00004bc0| 20 74 5d 20 38 20 22 5c | 0a 52 65 74 75 72 6e 20 | t] 8 "\|.Return |
|00004bd0| 54 20 69 66 20 53 51 55 | 41 52 45 20 62 65 6c 6f |T if SQU|ARE belo|
|00004be0| 6e 67 73 20 74 6f 20 61 | 20 71 74 75 70 6c 65 20 |ngs to a| qtuple |
|00004bf0| 66 69 6c 6c 65 64 20 20 | 77 69 74 68 20 56 41 4c |filled |with VAL|
|00004c00| 55 45 73 20 61 6c 6f 6e | 67 20 44 58 2c 20 44 59 |UEs alon|g DX, DY|
|00004c10| 2e 22 5d 29 0a 28 64 65 | 66 61 6c 69 61 73 20 27 |."]).(de|falias '|
|00004c20| 67 6f 6d 6f 6b 75 2d 63 | 72 6f 73 73 2d 77 69 6e |gomoku-c|ross-win|
|00004c30| 6e 69 6e 67 2d 71 74 75 | 70 6c 65 20 23 5b 6e 69 |ning-qtu|ple #[ni|
|00004c40| 6c 20 22 c0 09 5c 6e 0b | 5c 66 24 87 22 20 5b 67 |l "..\n.|\f$." [g|
|00004c50| 6f 6d 6f 6b 75 2d 63 72 | 6f 73 73 2d 71 74 75 70 |omoku-cr|oss-qtup|
|00004c60| 6c 65 20 67 6f 6d 6f 6b | 75 2d 77 69 6e 6e 69 6e |le gomok|u-winnin|
|00004c70| 67 2d 71 74 75 70 6c 65 | 2d 62 65 67 20 67 6f 6d |g-qtuple|-beg gom|
|00004c80| 6f 6b 75 2d 77 69 6e 6e | 69 6e 67 2d 71 74 75 70 |oku-winn|ing-qtup|
|00004c90| 6c 65 2d 65 6e 64 20 67 | 6f 6d 6f 6b 75 2d 77 69 |le-end g|omoku-wi|
|00004ca0| 6e 6e 69 6e 67 2d 71 74 | 75 70 6c 65 2d 64 78 20 |nning-qt|uple-dx |
|00004cb0| 67 6f 6d 6f 6b 75 2d 77 | 69 6e 6e 69 6e 67 2d 71 |gomoku-w|inning-q|
|00004cc0| 74 75 70 6c 65 2d 64 79 | 5d 20 35 20 22 5c 0a 43 |tuple-dy|] 5 "\.C|
|00004cd0| 72 6f 73 73 20 77 69 6e | 6e 69 6e 67 20 71 74 75 |ross win|ning qtu|
|00004ce0| 70 6c 65 2c 20 61 73 20 | 66 6f 75 6e 64 20 62 79 |ple, as |found by|
|00004cf0| 20 60 67 6f 6d 6f 6b 75 | 2d 66 69 6e 64 2d 66 69 | `gomoku|-find-fi|
|00004d00| 6c 6c 65 64 2d 71 74 75 | 70 6c 65 27 2e 22 5d 29 |lled-qtu|ple'."])|
|00004d10| 0a 28 64 65 66 61 6c 69 | 61 73 20 27 67 6f 6d 6f |.(defali|as 'gomo|
|00004d20| 6b 75 2d 63 72 6f 73 73 | 2d 71 74 75 70 6c 65 20 |ku-cross|-qtuple |
|00004d30| 23 5b 28 73 71 75 61 72 | 65 31 20 73 71 75 61 72 |#[(squar|e1 squar|
|00004d40| 65 32 20 64 78 20 64 79 | 29 20 22 8a c0 09 5c 6e |e2 dx dy|) "...\n|
|00004d50| 5c 22 1b 5c 66 0d 55 84 | aa 00 c6 5c 66 21 88 5c |\".\f.U.|...\f!.\|
|00004d60| 66 0b 5c 5c 14 09 c7 55 | 83 3e 00 5c 6e c8 55 83 |f.\\...U|.>.\n.U.|
|00004d70| 3e 00 c7 1e 09 0e 09 0e | 5c 6e 57 83 3a 00 0e 09 |>.......|\nW.:...|
|00004d80| 54 16 09 c7 75 88 cb cc | 21 88 82 23 00 29 82 06 |T...u...|!..#.)..|
|00004d90| 00 09 c8 55 83 69 00 5c | 6e c7 55 83 69 00 c7 1e |...U.i.\|n.U.i...|
|00004da0| 09 0e 09 0e 0d 57 83 65 | 00 0e 09 54 16 09 ce c7 |.....W.e|...T....|
|00004db0| 21 88 cb cf 21 88 82 4d | 00 29 82 06 00 09 d0 55 |!...!..M|.).....U|
|00004dc0| 83 8a 00 5c 6e c7 55 83 | 8a 00 d1 0e 5c 6e d2 a5 |...\n.U.|....\n..|
|00004dd0| 21 88 ce 0e 0d d2 a5 21 | 88 cb d3 21 88 82 06 00 |!......!|...!....|
|00004de0| 09 c7 55 83 06 00 5c 6e | c7 55 83 06 00 0e 5c 6e |..U...\n|.U....\n|
|00004df0| d2 a5 75 88 ce 0e 0d d2 | a5 21 88 cb d4 21 88 82 |..u.....|.!...!..|
|00004e00| 06 00 2a d5 c8 21 87 22 | 20 5b 67 6f 6d 6f 6b 75 |..*..!."| [gomoku|
|00004e10| 2d 78 79 2d 74 6f 2d 69 | 6e 64 65 78 20 64 78 20 |-xy-to-i|ndex dx |
|00004e20| 64 79 20 64 65 70 6c 20 | 73 71 75 61 72 65 31 20 |dy depl |square1 |
|00004e30| 73 71 75 61 72 65 32 20 | 67 6f 6d 6f 6b 75 2d 67 |square2 |gomoku-g|
|00004e40| 6f 74 6f 2d 73 71 75 61 | 72 65 20 31 20 30 20 6e |oto-squa|re 1 0 n|
|00004e50| 20 67 6f 6d 6f 6b 75 2d | 73 71 75 61 72 65 2d 77 | gomoku-|square-w|
|00004e60| 69 64 74 68 20 67 6f 6d | 6f 6b 75 2d 70 75 74 2d |idth gom|oku-put-|
|00004e70| 63 68 61 72 20 34 35 20 | 67 6f 6d 6f 6b 75 2d 73 |char 45 |gomoku-s|
|00004e80| 71 75 61 72 65 2d 68 65 | 69 67 68 74 20 6e 65 78 |quare-he|ight nex|
|00004e90| 74 2d 6c 69 6e 65 20 31 | 32 34 20 2d 31 20 62 61 |t-line 1|24 -1 ba|
|00004ea0| 63 6b 77 61 72 64 2d 63 | 68 61 72 20 32 20 34 37 |ckward-c|har 2 47|
|00004eb0| 20 39 32 20 73 69 74 2d | 66 6f 72 5d 20 33 20 22 | 92 sit-|for] 3 "|
|00004ec0| 5c 0a 43 72 6f 73 73 20 | 65 76 65 72 79 20 73 71 |\.Cross |every sq|
|00004ed0| 75 61 72 65 20 62 65 74 | 77 65 65 6e 20 53 51 55 |uare bet|ween SQU|
|00004ee0| 41 52 45 31 20 61 6e 64 | 20 53 51 55 41 52 45 32 |ARE1 and| SQUARE2|
|00004ef0| 20 69 6e 20 74 68 65 20 | 44 58 2c 20 44 59 20 64 | in the |DX, DY d|
|00004f00| 69 72 65 63 74 69 6f 6e | 2e 22 5d 29 0a 28 64 65 |irection|."]).(de|
|00004f10| 66 61 6c 69 61 73 20 27 | 67 6f 6d 6f 6b 75 2d 6d |falias '|gomoku-m|
|00004f20| 6f 76 65 2d 6c 65 66 74 | 20 23 5b 6e 69 6c 20 22 |ove-left| #[nil "|
|00004f30| c0 20 19 c2 09 84 5c 66 | 00 c3 82 17 00 09 c3 56 |. ....\f|.......V|
|00004f40| 83 16 00 5c 66 82 17 00 | c5 21 29 87 22 20 5b 67 |...\f...|.!)." [g|
|00004f50| 6f 6d 6f 6b 75 2d 70 6f | 69 6e 74 2d 78 20 78 20 |omoku-po|int-x x |
|00004f60| 62 61 63 6b 77 61 72 64 | 2d 63 68 61 72 20 31 20 |backward|-char 1 |
|00004f70| 67 6f 6d 6f 6b 75 2d 73 | 71 75 61 72 65 2d 77 69 |gomoku-s|quare-wi|
|00004f80| 64 74 68 20 30 5d 20 33 | 20 22 5c 0a 4d 6f 76 65 |dth 0] 3| "\.Move|
|00004f90| 20 70 6f 69 6e 74 20 62 | 61 63 6b 77 61 72 64 20 | point b|ackward |
|00004fa0| 6f 6e 65 20 63 6f 6c 75 | 6d 6e 20 6f 6e 20 74 68 |one colu|mn on th|
|00004fb0| 65 20 47 6f 6d 6f 6b 75 | 20 62 6f 61 72 64 2e 22 |e Gomoku| board."|
|00004fc0| 20 6e 69 6c 5d 29 0a 28 | 64 65 66 61 6c 69 61 73 | nil]).(|defalias|
|00004fd0| 20 27 67 6f 6d 6f 6b 75 | 2d 6d 6f 76 65 2d 72 69 | 'gomoku|-move-ri|
|00004fe0| 67 68 74 20 23 5b 6e 69 | 6c 20 22 c0 20 89 19 84 |ght #[ni|l ". ...|
|00004ff0| 0b 00 c2 82 16 00 09 0b | 57 83 15 00 5c 66 82 16 |........|W...\f..|
|00005000| 00 c5 75 29 87 22 20 5b | 67 6f 6d 6f 6b 75 2d 70 |..u)." [|gomoku-p|
|00005010| 6f 69 6e 74 2d 78 20 78 | 20 31 20 67 6f 6d 6f 6b |oint-x x| 1 gomok|
|00005020| 75 2d 62 6f 61 72 64 2d | 77 69 64 74 68 20 67 6f |u-board-|width go|
|00005030| 6d 6f 6b 75 2d 73 71 75 | 61 72 65 2d 77 69 64 74 |moku-squ|are-widt|
|00005040| 68 20 30 5d 20 33 20 22 | 5c 0a 4d 6f 76 65 20 70 |h 0] 3 "|\.Move p|
|00005050| 6f 69 6e 74 20 66 6f 72 | 77 61 72 64 20 6f 6e 65 |oint for|ward one|
|00005060| 20 63 6f 6c 75 6d 6e 20 | 6f 6e 20 74 68 65 20 47 | column |on the G|
|00005070| 6f 6d 6f 6b 75 20 62 6f | 61 72 64 2e 22 20 6e 69 |omoku bo|ard." ni|
|00005080| 6c 5d 29 0a 28 64 65 66 | 61 6c 69 61 73 20 27 67 |l]).(def|alias 'g|
|00005090| 6f 6d 6f 6b 75 2d 6d 6f | 76 65 2d 64 6f 77 6e 20 |omoku-mo|ve-down |
|000050a0| 23 5b 6e 69 6c 20 22 c0 | 20 19 c2 09 84 5c 66 00 |#[nil ".| ....\f.|
|000050b0| c3 82 17 00 09 5c 66 57 | 83 16 00 0d 82 17 00 c6 |.....\fW|........|
|000050c0| 21 29 87 22 20 5b 67 6f | 6d 6f 6b 75 2d 70 6f 69 |!)." [go|moku-poi|
|000050d0| 6e 74 2d 79 20 79 20 6e | 65 78 74 2d 6c 69 6e 65 |nt-y y n|ext-line|
|000050e0| 20 31 20 67 6f 6d 6f 6b | 75 2d 62 6f 61 72 64 2d | 1 gomok|u-board-|
|000050f0| 68 65 69 67 68 74 20 67 | 6f 6d 6f 6b 75 2d 73 71 |height g|omoku-sq|
|00005100| 75 61 72 65 2d 68 65 69 | 67 68 74 20 30 5d 20 33 |uare-hei|ght 0] 3|
|00005110| 20 22 5c 0a 4d 6f 76 65 | 20 70 6f 69 6e 74 20 64 | "\.Move| point d|
|00005120| 6f 77 6e 20 6f 6e 65 20 | 72 6f 77 20 6f 6e 20 74 |own one |row on t|
|00005130| 68 65 20 47 6f 6d 6f 6b | 75 20 62 6f 61 72 64 2e |he Gomok|u board.|
|00005140| 22 20 6e 69 6c 5d 29 0a | 28 64 65 66 61 6c 69 61 |" nil]).|(defalia|
|00005150| 73 20 27 67 6f 6d 6f 6b | 75 2d 6d 6f 76 65 2d 75 |s 'gomok|u-move-u|
|00005160| 70 20 23 5b 6e 69 6c 20 | 22 c0 20 19 c2 09 84 5c |p #[nil |". ....\|
|00005170| 66 00 c3 82 17 00 09 c3 | 56 83 16 00 5c 66 82 17 |f.......|V...\f..|
|00005180| 00 c5 21 29 87 22 20 5b | 67 6f 6d 6f 6b 75 2d 70 |..!)." [|gomoku-p|
|00005190| 6f 69 6e 74 2d 79 20 79 | 20 70 72 65 76 69 6f 75 |oint-y y| previou|
|000051a0| 73 2d 6c 69 6e 65 20 31 | 20 67 6f 6d 6f 6b 75 2d |s-line 1| gomoku-|
|000051b0| 73 71 75 61 72 65 2d 68 | 65 69 67 68 74 20 30 5d |square-h|eight 0]|
|000051c0| 20 33 20 22 5c 0a 4d 6f | 76 65 20 70 6f 69 6e 74 | 3 "\.Mo|ve point|
|000051d0| 20 75 70 20 6f 6e 65 20 | 72 6f 77 20 6f 6e 20 74 | up one |row on t|
|000051e0| 68 65 20 47 6f 6d 6f 6b | 75 20 62 6f 61 72 64 2e |he Gomok|u board.|
|000051f0| 22 20 6e 69 6c 5d 29 0a | 28 64 65 66 61 6c 69 61 |" nil]).|(defalia|
|00005200| 73 20 27 67 6f 6d 6f 6b | 75 2d 6d 6f 76 65 2d 6e |s 'gomok|u-move-n|
|00005210| 65 20 23 5b 6e 69 6c 20 | 22 c0 20 88 c1 20 87 22 |e #[nil |". .. ."|
|00005220| 20 5b 67 6f 6d 6f 6b 75 | 2d 6d 6f 76 65 2d 75 70 | [gomoku|-move-up|
|00005230| 20 67 6f 6d 6f 6b 75 2d | 6d 6f 76 65 2d 72 69 67 | gomoku-|move-rig|
|00005240| 68 74 5d 20 31 20 22 5c | 0a 4d 6f 76 65 20 70 6f |ht] 1 "\|.Move po|
|00005250| 69 6e 74 20 4e 6f 72 74 | 68 20 45 61 73 74 20 6f |int Nort|h East o|
|00005260| 6e 20 74 68 65 20 47 6f | 6d 6f 6b 75 20 62 6f 61 |n the Go|moku boa|
|00005270| 72 64 2e 22 20 6e 69 6c | 5d 29 0a 28 64 65 66 61 |rd." nil|]).(defa|
|00005280| 6c 69 61 73 20 27 67 6f | 6d 6f 6b 75 2d 6d 6f 76 |lias 'go|moku-mov|
|00005290| 65 2d 73 65 20 23 5b 6e | 69 6c 20 22 c0 20 88 c1 |e-se #[n|il ". ..|
|000052a0| 20 87 22 20 5b 67 6f 6d | 6f 6b 75 2d 6d 6f 76 65 | ." [gom|oku-move|
|000052b0| 2d 64 6f 77 6e 20 67 6f | 6d 6f 6b 75 2d 6d 6f 76 |-down go|moku-mov|
|000052c0| 65 2d 72 69 67 68 74 5d | 20 31 20 22 5c 0a 4d 6f |e-right]| 1 "\.Mo|
|000052d0| 76 65 20 70 6f 69 6e 74 | 20 53 6f 75 74 68 20 45 |ve point| South E|
|000052e0| 61 73 74 20 6f 6e 20 74 | 68 65 20 47 6f 6d 6f 6b |ast on t|he Gomok|
|000052f0| 75 20 62 6f 61 72 64 2e | 22 20 6e 69 6c 5d 29 0a |u board.|" nil]).|
|00005300| 28 64 65 66 61 6c 69 61 | 73 20 27 67 6f 6d 6f 6b |(defalia|s 'gomok|
|00005310| 75 2d 6d 6f 76 65 2d 6e | 77 20 23 5b 6e 69 6c 20 |u-move-n|w #[nil |
|00005320| 22 c0 20 88 c1 20 87 22 | 20 5b 67 6f 6d 6f 6b 75 |". .. ."| [gomoku|
|00005330| 2d 6d 6f 76 65 2d 75 70 | 20 67 6f 6d 6f 6b 75 2d |-move-up| gomoku-|
|00005340| 6d 6f 76 65 2d 6c 65 66 | 74 5d 20 31 20 22 5c 0a |move-lef|t] 1 "\.|
|00005350| 4d 6f 76 65 20 70 6f 69 | 6e 74 20 4e 6f 72 74 68 |Move poi|nt North|
|00005360| 20 57 65 73 74 20 6f 6e | 20 74 68 65 20 47 6f 6d | West on| the Gom|
|00005370| 6f 6b 75 20 62 6f 61 72 | 64 2e 22 20 6e 69 6c 5d |oku boar|d." nil]|
|00005380| 29 0a 28 64 65 66 61 6c | 69 61 73 20 27 67 6f 6d |).(defal|ias 'gom|
|00005390| 6f 6b 75 2d 6d 6f 76 65 | 2d 73 77 20 23 5b 6e 69 |oku-move|-sw #[ni|
|000053a0| 6c 20 22 c0 20 88 c1 20 | 87 22 20 5b 67 6f 6d 6f |l ". .. |." [gomo|
|000053b0| 6b 75 2d 6d 6f 76 65 2d | 64 6f 77 6e 20 67 6f 6d |ku-move-|down gom|
|000053c0| 6f 6b 75 2d 6d 6f 76 65 | 2d 6c 65 66 74 5d 20 31 |oku-move|-left] 1|
|000053d0| 20 22 5c 0a 4d 6f 76 65 | 20 70 6f 69 6e 74 20 53 | "\.Move| point S|
|000053e0| 6f 75 74 68 20 57 65 73 | 74 20 6f 6e 20 74 68 65 |outh Wes|t on the|
|000053f0| 20 47 6f 6d 6f 6b 75 20 | 62 6f 61 72 64 2e 22 20 | Gomoku |board." |
|00005400| 6e 69 6c 5d 29 0a 28 70 | 72 6f 76 69 64 65 20 28 |nil]).(p|rovide (|
|00005410| 71 75 6f 74 65 20 67 6f | 6d 6f 6b 75 29 29 0a |quote go|moku)). |
+--------+-------------------------+-------------------------+--------+--------+