home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / emacs-19.16 / lisp / gomoku.elc < prev    next >
Emacs Compiled Lisp  |  1993-07-05  |  21.1 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.

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Emacs Compiled Lisp (other/emacsCompiledLisp) magic Unsupported
1% dexvert Combustion 2 Particle Library (other/combustion2ParticleLibrary) ext Unsupported
100% file Emacs/XEmacs v19 byte-compiled Lisp data default
99% file data default
55% TrID Emacs/XEmacs byte-compiled Lisp (generic) default
44% TrID Summation Document Image Information Load File default (weak)
100% xdgMime text/x-emacs-lisp default (weak)



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 6a 69 6d 62 40 67 65 |piled by| jimb@ge|
|00000020| 65 63 68 2e 67 6e 75 2e | 61 69 2e 6d 69 74 2e 65 |ech.gnu.|ai.mit.e|
|00000030| 64 75 20 6f 6e 20 4d 6f | 6e 20 4a 75 6c 20 20 35 |du on Mo|n Jul 5|
|00000040| 20 32 33 3a 31 34 3a 35 | 34 20 31 39 39 33 0a 3b | 23:14:5|4 1993.;|
|00000050| 3b 3b 20 66 72 6f 6d 20 | 66 69 6c 65 20 2f 67 64 |;; from |file /gd|
|00000060| 2f 67 6e 75 2f 65 6d 61 | 63 73 2f 31 39 2e 30 2f |/gnu/ema|cs/19.0/|
|00000070| 6c 69 73 70 2f 67 6f 6d | 6f 6b 75 2e 65 6c 0a 3b |lisp/gom|oku.el.;|
|00000080| 3b 3b 20 65 6d 61 63 73 | 20 76 65 72 73 69 6f 6e |;; emacs| version|
|00000090| 20 31 39 2e 31 35 2e 31 | 36 2e 0a 3b 3b 3b 20 62 | 19.15.1|6..;;; 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 | 54 68 69 73 20 66 69 6c |(error "|This fil|
|000001a0| 65 20 77 61 73 20 63 6f | 6d 70 69 6c 65 64 20 66 |e was co|mpiled f|
|000001b0| 6f 72 20 45 6d 61 63 73 | 20 31 39 22 29 29 0a 0a |or Emacs| 19"))..|
|000001c0| 28 64 65 66 76 61 72 20 | 67 6f 6d 6f 6b 75 2d 6d |(defvar |gomoku-m|
|000001d0| 6f 64 65 2d 68 6f 6f 6b | 20 6e 69 6c 20 22 5c 0a |ode-hook| nil "\.|
|000001e0| 49 66 20 6e 6f 6e 2d 6e | 69 6c 2c 20 69 74 73 20 |If non-n|il, its |
|000001f0| 76 61 6c 75 65 20 69 73 | 20 63 61 6c 6c 65 64 20 |value is| called |
|00000200| 6f 6e 20 65 6e 74 72 79 | 20 74 6f 20 47 6f 6d 6f |on entry| to Gomo|
|00000210| 6b 75 20 6d 6f 64 65 2e | 22 29 0a 28 64 65 66 76 |ku mode.|").(defv|
|00000220| 61 72 20 67 6f 6d 6f 6b | 75 2d 6d 6f 64 65 2d 6d |ar gomok|u-mode-m|
|00000230| 61 70 20 6e 69 6c 20 22 | 5c 0a 4c 6f 63 61 6c 20 |ap nil "|\.Local |
|00000240| 6b 65 79 6d 61 70 20 74 | 6f 20 75 73 65 20 69 6e |keymap t|o use in|
|00000250| 20 47 6f 6d 6f 6b 75 20 | 6d 6f 64 65 2e 22 29 0a | Gomoku |mode.").|
|00000260| 28 62 79 74 65 2d 63 6f | 64 65 20 22 08 84 9d 00 |(byte-co|de "....|
|00000270| c1 20 10 c2 08 c3 c4 23 | 88 c2 08 c5 c6 23 88 c2 |. .....#|.....#..|
|00000280| 08 c7 c8 23 88 c2 08 c9 | ca 23 88 c2 08 cb cc 23 |...#....|.#.....#|
|00000290| 88 c2 08 cd ce 23 88 c2 | 08 cf d0 23 88 c2 08 d1 |.....#..|...#....|
|000002a0| d2 23 88 c2 08 d3 d0 23 | 88 c2 08 d4 d2 23 88 c2 |.#.....#|.....#..|
|000002b0| 08 d5 ce 23 88 c2 08 d6 | cc 23 88 c2 08 d7 d8 23 |...#....|.#.....#|
|000002c0| 88 c2 08 d9 d8 23 88 c2 | 08 da d8 23 88 c2 08 db |.....#..|...#....|
|000002d0| d8 23 88 c2 08 dc dd 23 | 88 c2 08 de df 23 88 c2 |.#.....#|.....#..|
|000002e0| 08 e0 e1 23 88 c2 08 e2 | d2 23 88 c2 08 e3 d0 23 |...#....|.#.....#|
|000002f0| 88 c2 08 e4 cc 23 88 c2 | 08 e5 ce 23 88 c2 08 e6 |.....#..|...#....|
|00000300| d8 23 88 c2 08 e7 d8 23 | 88 c1 87 22 20 5b 67 6f |.#.....#|..." [go|
|00000310| 6d 6f 6b 75 2d 6d 6f 64 | 65 2d 6d 61 70 20 6d 61 |moku-mod|e-map ma|
|00000320| 6b 65 2d 73 70 61 72 73 | 65 2d 6b 65 79 6d 61 70 |ke-spars|e-keymap|
|00000330| 20 64 65 66 69 6e 65 2d | 6b 65 79 20 22 79 22 20 | define-|key "y" |
|00000340| 67 6f 6d 6f 6b 75 2d 6d | 6f 76 65 2d 6e 77 20 22 |gomoku-m|ove-nw "|
|00000350| 75 22 20 67 6f 6d 6f 6b | 75 2d 6d 6f 76 65 2d 6e |u" gomok|u-move-n|
|00000360| 65 20 22 62 22 20 67 6f | 6d 6f 6b 75 2d 6d 6f 76 |e "b" go|moku-mov|
|00000370| 65 2d 73 77 20 22 6e 22 | 20 67 6f 6d 6f 6b 75 2d |e-sw "n"| gomoku-|
|00000380| 6d 6f 76 65 2d 73 65 20 | 22 68 22 20 67 6f 6d 6f |move-se |"h" gomo|
|00000390| 6b 75 2d 6d 6f 76 65 2d | 6c 65 66 74 20 22 6c 22 |ku-move-|left "l"|
|000003a0| 20 67 6f 6d 6f 6b 75 2d | 6d 6f 76 65 2d 72 69 67 | gomoku-|move-rig|
|000003b0| 68 74 20 22 6a 22 20 67 | 6f 6d 6f 6b 75 2d 6d 6f |ht "j" g|omoku-mo|
|000003c0| 76 65 2d 64 6f 77 6e 20 | 22 6b 22 20 67 6f 6d 6f |ve-down |"k" gomo|
|000003d0| 6b 75 2d 6d 6f 76 65 2d | 75 70 20 22 0e 22 20 22 |ku-move-|up "." "|
|000003e0| 10 22 20 22 06 22 20 22 | 02 22 20 22 58 22 20 67 |." "." "|." "X" g|
|000003f0| 6f 6d 6f 6b 75 2d 68 75 | 6d 61 6e 2d 70 6c 61 79 |omoku-hu|man-play|
|00000400| 73 20 22 78 22 20 22 0d | 22 20 22 03 70 22 20 22 |s "x" ".|" ".p" "|
|00000410| 03 62 22 20 67 6f 6d 6f | 6b 75 2d 68 75 6d 61 6e |.b" gomo|ku-human|
|00000420| 2d 74 61 6b 65 73 2d 62 | 61 63 6b 20 22 03 72 22 |-takes-b|ack ".r"|
|00000430| 20 67 6f 6d 6f 6b 75 2d | 68 75 6d 61 6e 2d 72 65 | gomoku-|human-re|
|00000440| 73 69 67 6e 73 20 22 03 | 65 22 20 67 6f 6d 6f 6b |signs ".|e" gomok|
|00000450| 75 2d 65 6d 61 63 73 2d | 70 6c 61 79 73 20 5b 75 |u-emacs-|plays [u|
|00000460| 70 5d 20 5b 64 6f 77 6e | 5d 20 5b 6c 65 66 74 5d |p] [down|] [left]|
|00000470| 20 5b 72 69 67 68 74 5d | 20 5b 6b 70 2d 65 6e 74 | [right]| [kp-ent|
|00000480| 65 72 5d 20 5b 69 6e 73 | 65 72 74 5d 5d 20 34 29 |er] [ins|ert]] 4)|
|00000490| 0a 28 64 65 66 61 6c 69 | 61 73 20 27 67 6f 6d 6f |.(defali|as 'gomo|
|000004a0| 6b 75 2d 6d 6f 64 65 20 | 23 5b 6e 69 6c 20 22 c0 |ku-mode |#[nil ".|
|000004b0| 11 c2 13 c4 20 88 c5 0e | 06 21 88 c7 c8 21 87 22 |.... ...|.!...!."|
|000004c0| 20 5b 67 6f 6d 6f 6b 75 | 2d 6d 6f 64 65 20 6d 61 | [gomoku|-mode ma|
|000004d0| 6a 6f 72 2d 6d 6f 64 65 | 20 22 47 6f 6d 6f 6b 75 |jor-mode| "Gomoku|
|000004e0| 22 20 6d 6f 64 65 2d 6e | 61 6d 65 20 67 6f 6d 6f |" mode-n|ame gomo|
|000004f0| 6b 75 2d 64 69 73 70 6c | 61 79 2d 73 74 61 74 69 |ku-displ|ay-stati|
|00000500| 73 74 69 63 73 20 75 73 | 65 2d 6c 6f 63 61 6c 2d |stics us|e-local-|
|00000510| 6d 61 70 20 67 6f 6d 6f | 6b 75 2d 6d 6f 64 65 2d |map gomo|ku-mode-|
|00000520| 6d 61 70 20 72 75 6e 2d | 68 6f 6f 6b 73 20 67 6f |map run-|hooks go|
|00000530| 6d 6f 6b 75 2d 6d 6f 64 | 65 2d 68 6f 6f 6b 5d 20 |moku-mod|e-hook] |
|00000540| 32 20 22 5c 0a 4d 61 6a | 6f 72 20 6d 6f 64 65 20 |2 "\.Maj|or mode |
|00000550| 66 6f 72 20 70 6c 61 79 | 69 6e 67 20 47 6f 6d 6f |for play|ing Gomo|
|00000560| 6b 75 20 61 67 61 69 6e | 73 74 20 45 6d 61 63 73 |ku again|st Emacs|
|00000570| 2e 0a 59 6f 75 20 61 6e | 64 20 45 6d 61 63 73 20 |..You an|d Emacs |
|00000580| 70 6c 61 79 20 69 6e 20 | 74 75 72 6e 20 62 79 20 |play in |turn by |
|00000590| 6d 61 72 6b 69 6e 67 20 | 61 20 66 72 65 65 20 73 |marking |a free s|
|000005a0| 71 75 61 72 65 2e 20 20 | 59 6f 75 20 6d 61 72 6b |quare. |You mark|
|000005b0| 20 69 74 20 77 69 74 68 | 20 58 0a 61 6e 64 20 45 | it with| X.and E|
|000005c0| 6d 61 63 73 20 6d 61 72 | 6b 73 20 69 74 20 77 69 |macs mar|ks it wi|
|000005d0| 74 68 20 4f 2e 20 20 54 | 68 65 20 77 69 6e 6e 65 |th O. T|he winne|
|000005e0| 72 20 69 73 20 74 68 65 | 20 66 69 72 73 74 20 74 |r is the| first t|
|000005f0| 6f 20 67 65 74 20 66 69 | 76 65 20 63 6f 6e 74 69 |o get fi|ve conti|
|00000600| 67 75 6f 75 73 0a 6d 61 | 72 6b 73 20 68 6f 72 69 |guous.ma|rks hori|
|00000610| 7a 6f 6e 74 61 6c 6c 79 | 2c 20 76 65 72 74 69 63 |zontally|, vertic|
|00000620| 61 6c 6c 79 20 6f 72 20 | 69 6e 20 64 69 61 67 6f |ally or |in diago|
|00000630| 6e 61 6c 2e 0a 0a 59 6f | 75 20 70 6c 61 79 20 62 |nal...Yo|u play b|
|00000640| 79 20 6d 6f 76 69 6e 67 | 20 74 68 65 20 63 75 72 |y moving| the cur|
|00000650| 73 6f 72 20 6f 76 65 72 | 20 74 68 65 20 73 71 75 |sor over| the squ|
|00000660| 61 72 65 20 79 6f 75 20 | 63 68 6f 6f 73 65 20 61 |are you |choose a|
|00000670| 6e 64 20 68 69 74 74 69 | 6e 67 20 5c 5c 5b 67 6f |nd hitti|ng \\[go|
|00000680| 6d 6f 6b 75 2d 68 75 6d | 61 6e 2d 70 6c 61 79 73 |moku-hum|an-plays|
|00000690| 5d 2e 0a 0a 4f 74 68 65 | 72 20 75 73 65 66 75 6c |]...Othe|r useful|
|000006a0| 20 63 6f 6d 6d 61 6e 64 | 73 3a 0a 5c 5c 7b 67 6f | command|s:.\\{go|
|000006b0| 6d 6f 6b 75 2d 6d 6f 64 | 65 2d 6d 61 70 7d 0a 45 |moku-mod|e-map}.E|
|000006c0| 6e 74 72 79 20 74 6f 20 | 74 68 69 73 20 6d 6f 64 |ntry to |this mod|
|000006d0| 65 20 63 61 6c 6c 73 20 | 74 68 65 20 76 61 6c 75 |e calls |the valu|
|000006e0| 65 20 6f 66 20 60 67 6f | 6d 6f 6b 75 2d 6d 6f 64 |e of `go|moku-mod|
|000006f0| 65 2d 68 6f 6f 6b 27 20 | 69 66 20 74 68 61 74 20 |e-hook' |if that |
|00000700| 76 61 6c 75 65 0a 69 73 | 20 6e 6f 6e 2d 6e 69 6c |value.is| non-nil|
|00000710| 2e 22 20 6e 69 6c 5d 29 | 0a 28 64 65 66 76 61 72 |." nil])|.(defvar|
|00000720| 20 67 6f 6d 6f 6b 75 2d | 62 6f 61 72 64 2d 77 69 | gomoku-|board-wi|
|00000730| 64 74 68 20 6e 69 6c 20 | 22 5c 0a 4e 75 6d 62 65 |dth nil |"\.Numbe|
|00000740| 72 20 6f 66 20 63 6f 6c | 75 6d 6e 73 20 6f 6e 20 |r of col|umns on |
|00000750| 74 68 65 20 47 6f 6d 6f | 6b 75 20 62 6f 61 72 64 |the Gomo|ku board|
|00000760| 2e 22 29 0a 28 64 65 66 | 76 61 72 20 67 6f 6d 6f |.").(def|var gomo|
|00000770| 6b 75 2d 62 6f 61 72 64 | 2d 68 65 69 67 68 74 20 |ku-board|-height |
|00000780| 6e 69 6c 20 22 5c 0a 4e | 75 6d 62 65 72 20 6f 66 |nil "\.N|umber of|
|00000790| 20 6c 69 6e 65 73 20 6f | 6e 20 74 68 65 20 47 6f | lines o|n the Go|
|000007a0| 6d 6f 6b 75 20 62 6f 61 | 72 64 2e 22 29 0a 28 64 |moku boa|rd.").(d|
|000007b0| 65 66 76 61 72 20 67 6f | 6d 6f 6b 75 2d 62 6f 61 |efvar go|moku-boa|
|000007c0| 72 64 20 6e 69 6c 20 22 | 5c 0a 56 65 63 74 6f 72 |rd nil "|\.Vector|
|000007d0| 20 72 65 63 6f 72 64 69 | 6e 67 20 74 68 65 20 61 | recordi|ng the a|
|000007e0| 63 74 75 61 6c 20 73 74 | 61 74 65 20 6f 66 20 74 |ctual st|ate of t|
|000007f0| 68 65 20 47 6f 6d 6f 6b | 75 20 62 6f 61 72 64 2e |he Gomok|u board.|
|00000800| 22 29 0a 28 64 65 66 76 | 61 72 20 67 6f 6d 6f 6b |").(defv|ar gomok|
|00000810| 75 2d 76 65 63 74 6f 72 | 2d 6c 65 6e 67 74 68 20 |u-vector|-length |
|00000820| 6e 69 6c 20 22 5c 0a 4c | 65 6e 67 74 68 20 6f 66 |nil "\.L|ength of|
|00000830| 20 67 6f 6d 6f 6b 75 2d | 62 6f 61 72 64 20 76 65 | gomoku-|board ve|
|00000840| 63 74 6f 72 2e 22 29 0a | 28 64 65 66 76 61 72 20 |ctor.").|(defvar |
|00000850| 67 6f 6d 6f 6b 75 2d 64 | 72 61 77 2d 6c 69 6d 69 |gomoku-d|raw-limi|
|00000860| 74 20 6e 69 6c 20 22 5c | 0a 41 66 74 65 72 20 68 |t nil "\|.After h|
|00000870| 6f 77 20 6d 61 6e 79 20 | 6d 6f 76 65 73 20 77 69 |ow many |moves wi|
|00000880| 6c 6c 20 45 6d 61 63 73 | 20 6f 66 66 65 72 20 61 |ll Emacs| offer a|
|00000890| 20 64 72 61 77 3f 22 29 | 0a 28 64 65 66 61 6c 69 | draw?")|.(defali|
|000008a0| 61 73 20 27 67 6f 6d 6f | 6b 75 2d 78 79 2d 74 6f |as 'gomo|ku-xy-to|
|000008b0| 2d 69 6e 64 65 78 20 23 | 5b 28 78 20 79 29 20 22 |-index #|[(x y) "|
|000008c0| 08 09 5f 5c 6e 08 5c 5c | 5c 5c 87 22 20 5b 79 20 |.._\n.\\|\\." [y |
|000008d0| 67 6f 6d 6f 6b 75 2d 62 | 6f 61 72 64 2d 77 69 64 |gomoku-b|oard-wid|
|000008e0| 74 68 20 78 5d 20 33 20 | 22 5c 0a 54 72 61 6e 73 |th x] 3 |"\.Trans|
|000008f0| 6c 61 74 65 20 58 2c 20 | 59 20 63 61 72 74 65 73 |late X, |Y cartes|
|00000900| 69 61 6e 20 63 6f 6f 72 | 64 73 20 69 6e 74 6f 20 |ian coor|ds into |
|00000910| 74 68 65 20 63 6f 72 72 | 65 73 70 6f 6e 64 69 6e |the corr|espondin|
|00000920| 67 20 62 6f 61 72 64 20 | 69 6e 64 65 78 2e 22 5d |g board |index."]|
|00000930| 29 0a 28 64 65 66 61 6c | 69 61 73 20 27 67 6f 6d |).(defal|ias 'gom|
|00000940| 6f 6b 75 2d 69 6e 64 65 | 78 2d 74 6f 2d 78 20 23 |oku-inde|x-to-x #|
|00000950| 5b 28 69 6e 64 65 78 29 | 20 22 08 09 54 a6 87 22 |[(index)| "..T.."|
|00000960| 20 5b 69 6e 64 65 78 20 | 67 6f 6d 6f 6b 75 2d 62 | [index |gomoku-b|
|00000970| 6f 61 72 64 2d 77 69 64 | 74 68 5d 20 32 20 22 5c |oard-wid|th] 2 "\|
|00000980| 0a 52 65 74 75 72 6e 20 | 63 6f 72 72 65 73 70 6f |.Return |correspo|
|00000990| 6e 64 69 6e 67 20 78 2d | 63 6f 6f 72 64 20 6f 66 |nding x-|coord of|
|000009a0| 20 62 6f 61 72 64 20 49 | 4e 44 45 58 2e 22 5d 29 | board I|NDEX."])|
|000009b0| 0a 28 64 65 66 61 6c 69 | 61 73 20 27 67 6f 6d 6f |.(defali|as 'gomo|
|000009c0| 6b 75 2d 69 6e 64 65 78 | 2d 74 6f 2d 79 20 23 5b |ku-index|-to-y #[|
|000009d0| 28 69 6e 64 65 78 29 20 | 22 08 09 54 a5 87 22 20 |(index) |"..T.." |
|000009e0| 5b 69 6e 64 65 78 20 67 | 6f 6d 6f 6b 75 2d 62 6f |[index g|omoku-bo|
|000009f0| 61 72 64 2d 77 69 64 74 | 68 5d 20 32 20 22 5c 0a |ard-widt|h] 2 "\.|
|00000a00| 52 65 74 75 72 6e 20 63 | 6f 72 72 65 73 70 6f 6e |Return c|orrespon|
|00000a10| 64 69 6e 67 20 79 2d 63 | 6f 6f 72 64 20 6f 66 20 |ding y-c|oord of |
|00000a20| 62 6f 61 72 64 20 49 4e | 44 45 58 2e 22 5d 29 0a |board IN|DEX."]).|
|00000a30| 28 64 65 66 61 6c 69 61 | 73 20 27 67 6f 6d 6f 6b |(defalia|s 'gomok|
|00000a40| 75 2d 69 6e 69 74 2d 62 | 6f 61 72 64 20 23 5b 6e |u-init-b|oard #[n|
|00000a50| 69 6c 20 22 c0 09 c2 5c | 22 13 c2 09 53 1c 1d 0d |il "...\|"...S...|
|00000a60| 0e 06 58 83 24 00 0b 0d | c7 49 88 0b 0c c7 49 88 |..X.$...|.I....I.|
|00000a70| 0d 54 15 0c 53 14 82 5c | 6e 00 2a c2 1d c2 09 57 |.T..S..\|n.*....W|
|00000a80| 85 3d 00 0b 0d c7 49 88 | 0d 0e 06 c8 5c 5c 5c 5c |.=....I.|....\\\\|
|00000a90| 89 15 82 28 00 29 87 22 | 20 5b 6d 61 6b 65 2d 76 |...(.)."| [make-v|
|00000aa0| 65 63 74 6f 72 20 67 6f | 6d 6f 6b 75 2d 76 65 63 |ector go|moku-vec|
|00000ab0| 74 6f 72 2d 6c 65 6e 67 | 74 68 20 30 20 67 6f 6d |tor-leng|th 0 gom|
|00000ac0| 6f 6b 75 2d 62 6f 61 72 | 64 20 69 69 20 69 20 67 |oku-boar|d ii i g|
|00000ad0| 6f 6d 6f 6b 75 2d 62 6f | 61 72 64 2d 77 69 64 74 |omoku-bo|ard-widt|
|00000ae0| 68 20 2d 31 20 31 5d 20 | 34 20 22 5c 0a 43 72 65 |h -1 1] |4 "\.Cre|
|00000af0| 61 74 65 20 74 68 65 20 | 67 6f 6d 6f 6b 75 2d 62 |ate the |gomoku-b|
|00000b00| 6f 61 72 64 20 76 65 63 | 74 6f 72 20 61 6e 64 20 |oard vec|tor and |
|00000b10| 66 69 6c 6c 20 69 74 20 | 77 69 74 68 20 69 6e 69 |fill it |with ini|
|00000b20| 74 69 61 6c 20 76 61 6c | 75 65 73 2e 22 5d 29 0a |tial val|ues."]).|
|00000b30| 28 64 65 66 76 61 72 20 | 67 6f 6d 6f 6b 75 2d 73 |(defvar |gomoku-s|
|00000b40| 63 6f 72 65 2d 74 61 62 | 6c 65 20 6e 69 6c 20 22 |core-tab|le nil "|
|00000b50| 5c 0a 56 65 63 74 6f 72 | 20 72 65 63 6f 72 64 69 |\.Vector| recordi|
|00000b60| 6e 67 20 74 68 65 20 61 | 63 74 75 61 6c 20 73 63 |ng the a|ctual sc|
|00000b70| 6f 72 65 20 6f 66 20 74 | 68 65 20 66 72 65 65 20 |ore of t|he free |
|00000b80| 73 71 75 61 72 65 73 2e | 22 29 0a 28 64 65 66 63 |squares.|").(defc|
|00000b90| 6f 6e 73 74 20 6e 69 6c | 2d 73 63 6f 72 65 20 37 |onst nil|-score 7|
|00000ba0| 20 22 5c 0a 53 63 6f 72 | 65 20 6f 66 20 61 6e 20 | "\.Scor|e of an |
|00000bb0| 65 6d 70 74 79 20 71 74 | 75 70 6c 65 2e 22 29 0a |empty qt|uple.").|
|00000bc0| 28 64 65 66 63 6f 6e 73 | 74 20 58 73 63 6f 72 65 |(defcons|t Xscore|
|00000bd0| 20 31 35 20 22 5c 0a 53 | 63 6f 72 65 20 6f 66 20 | 15 "\.S|core of |
|00000be0| 61 20 71 74 75 70 6c 65 | 20 63 6f 6e 74 61 69 6e |a qtuple| contain|
|00000bf0| 69 6e 67 20 6f 6e 65 20 | 58 2e 22 29 0a 28 64 65 |ing one |X.").(de|
|00000c00| 66 63 6f 6e 73 74 20 58 | 58 73 63 6f 72 65 20 34 |fconst X|Xscore 4|
|00000c10| 30 30 20 22 5c 0a 53 63 | 6f 72 65 20 6f 66 20 61 |00 "\.Sc|ore of a|
|00000c20| 20 71 74 75 70 6c 65 20 | 63 6f 6e 74 61 69 6e 69 | qtuple |containi|
|00000c30| 6e 67 20 74 77 6f 20 58 | 27 73 2e 22 29 0a 28 64 |ng two X|'s.").(d|
|00000c40| 65 66 63 6f 6e 73 74 20 | 58 58 58 73 63 6f 72 65 |efconst |XXXscore|
|00000c50| 20 31 38 30 30 20 22 5c | 0a 53 63 6f 72 65 20 6f | 1800 "\|.Score o|
|00000c60| 66 20 61 20 71 74 75 70 | 6c 65 20 63 6f 6e 74 61 |f a qtup|le conta|
|00000c70| 69 6e 69 6e 67 20 74 68 | 72 65 65 20 58 27 73 2e |ining th|ree X's.|
|00000c80| 22 29 0a 28 64 65 66 63 | 6f 6e 73 74 20 58 58 58 |").(defc|onst XXX|
|00000c90| 58 73 63 6f 72 65 20 31 | 30 30 30 30 30 20 22 5c |Xscore 1|00000 "\|
|00000ca0| 0a 53 63 6f 72 65 20 6f | 66 20 61 20 71 74 75 70 |.Score o|f a qtup|
|00000cb0| 6c 65 20 63 6f 6e 74 61 | 69 6e 69 6e 67 20 66 6f |le conta|ining fo|
|00000cc0| 75 72 20 58 27 73 2e 22 | 29 0a 28 64 65 66 63 6f |ur X's."|).(defco|
|00000cd0| 6e 73 74 20 4f 73 63 6f | 72 65 20 33 35 20 22 5c |nst Osco|re 35 "\|
|00000ce0| 0a 53 63 6f 72 65 20 6f | 66 20 61 20 71 74 75 70 |.Score o|f a qtup|
|00000cf0| 6c 65 20 63 6f 6e 74 61 | 69 6e 69 6e 67 20 6f 6e |le conta|ining on|
|00000d00| 65 20 4f 2e 22 29 0a 28 | 64 65 66 63 6f 6e 73 74 |e O.").(|defconst|
|00000d10| 20 4f 4f 73 63 6f 72 65 | 20 38 30 30 20 22 5c 0a | OOscore| 800 "\.|
|00000d20| 53 63 6f 72 65 20 6f 66 | 20 61 20 71 74 75 70 6c |Score of| a qtupl|
|00000d30| 65 20 63 6f 6e 74 61 69 | 6e 69 6e 67 20 74 77 6f |e contai|ning two|
|00000d40| 20 4f 27 73 2e 22 29 0a | 28 64 65 66 63 6f 6e 73 | O's.").|(defcons|
|00000d50| 74 20 4f 4f 4f 73 63 6f | 72 65 20 31 35 30 30 30 |t OOOsco|re 15000|
|00000d60| 20 22 5c 0a 53 63 6f 72 | 65 20 6f 66 20 61 20 71 | "\.Scor|e of a q|
|00000d70| 74 75 70 6c 65 20 63 6f | 6e 74 61 69 6e 69 6e 67 |tuple co|ntaining|
|00000d80| 20 74 68 72 65 65 20 4f | 27 73 2e 22 29 0a 28 64 | three O|'s.").(d|
|00000d90| 65 66 63 6f 6e 73 74 20 | 4f 4f 4f 4f 73 63 6f 72 |efconst |OOOOscor|
|00000da0| 65 20 38 30 30 30 30 30 | 20 22 5c 0a 53 63 6f 72 |e 800000| "\.Scor|
|00000db0| 65 20 6f 66 20 61 20 71 | 74 75 70 6c 65 20 63 6f |e of a q|tuple co|
|00000dc0| 6e 74 61 69 6e 69 6e 67 | 20 66 6f 75 72 20 4f 27 |ntaining| four O'|
|00000dd0| 73 2e 22 29 0a 28 64 65 | 66 63 6f 6e 73 74 20 67 |s.").(de|fconst g|
|00000de0| 6f 6d 6f 6b 75 2d 73 63 | 6f 72 65 2d 74 72 61 6e |omoku-sc|ore-tran|
|00000df0| 73 2d 74 61 62 6c 65 20 | 28 62 79 74 65 2d 63 6f |s-table |(byte-co|
|00000e00| 64 65 20 22 c0 09 5c 6e | 0b 0c 0d c6 0e 07 c6 89 |de "..\n|........|
|00000e10| 89 89 89 0e 08 c6 89 89 | 89 89 0e 09 c6 89 89 89 |........|........|
|00000e20| 89 0e 5c 6e c6 89 89 89 | 89 89 26 1f 87 22 20 5b |..\n....|..&.." [|
|00000e30| 76 65 63 74 6f 72 20 6e | 69 6c 2d 73 63 6f 72 65 |vector n|il-score|
|00000e40| 20 58 73 63 6f 72 65 20 | 58 58 73 63 6f 72 65 20 | Xscore |XXscore |
|00000e50| 58 58 58 73 63 6f 72 65 | 20 58 58 58 58 73 63 6f |XXXscore| XXXXsco|
|00000e60| 72 65 20 30 20 4f 73 63 | 6f 72 65 20 4f 4f 73 63 |re 0 Osc|ore OOsc|
|00000e70| 6f 72 65 20 4f 4f 4f 73 | 63 6f 72 65 20 4f 4f 4f |ore OOOs|core OOO|
|00000e80| 4f 73 63 6f 72 65 5d 20 | 33 32 29 20 22 5c 0a 56 |Oscore] |32) "\.V|
|00000e90| 65 63 74 6f 72 20 61 73 | 73 6f 63 69 61 74 69 6e |ector as|sociatin|
|00000ea0| 67 20 71 74 75 70 6c 65 | 20 63 6f 6e 74 65 6e 74 |g qtuple| content|
|00000eb0| 73 20 74 6f 20 74 68 65 | 69 72 20 73 63 6f 72 65 |s to the|ir score|
|00000ec0| 2e 22 29 0a 28 64 65 66 | 63 6f 6e 73 74 20 67 6f |.").(def|const go|
|00000ed0| 6d 6f 6b 75 2d 77 69 6e | 6e 69 6e 67 2d 74 68 72 |moku-win|ning-thr|
|00000ee0| 65 73 68 6f 6c 64 20 4f | 4f 4f 4f 73 63 6f 72 65 |eshold O|OOOscore|
|00000ef0| 20 22 5c 0a 54 68 72 65 | 73 68 6f 6c 64 20 73 63 | "\.Thre|shold sc|
|00000f00| 6f 72 65 20 62 65 79 6f | 6e 64 20 77 68 69 63 68 |ore beyo|nd which|
|00000f10| 20 61 6e 20 45 6d 61 63 | 73 20 6d 6f 76 65 20 69 | an Emac|s move i|
|00000f20| 73 20 77 69 6e 6e 69 6e | 67 2e 22 29 0a 28 64 65 |s winnin|g.").(de|
|00000f30| 66 63 6f 6e 73 74 20 67 | 6f 6d 6f 6b 75 2d 6c 6f |fconst g|omoku-lo|
|00000f40| 6f 73 69 6e 67 2d 74 68 | 72 65 73 68 6f 6c 64 20 |osing-th|reshold |
|00000f50| 58 58 58 58 73 63 6f 72 | 65 20 22 5c 0a 54 68 72 |XXXXscor|e "\.Thr|
|00000f60| 65 73 68 6f 6c 64 20 73 | 63 6f 72 65 20 62 65 79 |eshold s|core bey|
|00000f70| 6f 6e 64 20 77 68 69 63 | 68 20 61 20 68 75 6d 61 |ond whic|h a huma|
|00000f80| 6e 20 6d 6f 76 65 20 69 | 73 20 77 69 6e 6e 69 6e |n move i|s winnin|
|00000f90| 67 2e 22 29 0a 28 64 65 | 66 61 6c 69 61 73 20 27 |g.").(de|falias '|
|00000fa0| 67 6f 6d 6f 6b 75 2d 73 | 74 72 6f 6e 67 65 73 74 |gomoku-s|trongest|
|00000fb0| 2d 73 71 75 61 72 65 20 | 23 5b 6e 69 6c 20 22 c0 |-square |#[nil ".|
|00000fc0| 89 c1 c2 89 5c 22 c1 0b | 0c 5c 22 c5 89 1e 06 1e |....\"..|.\".....|
|00000fd0| 07 1e 08 1e 09 1e 5c 6e | 1e 0b 0e 09 0e 08 58 83 |......\n|......X.|
|00000fe0| 8e 00 0e 0c 0e 09 48 0e | 0b 57 84 85 00 0e 0c 0e |......H.|.W......|
|00000ff0| 09 48 89 16 06 0e 0b 56 | 83 5b 00 0e 0d 0e 09 48 |.H.....V|.[.....H|
|00001000| c0 55 83 51 00 c2 16 5c | 6e 0e 09 16 07 0e 06 16 |.U.Q...\|n.......|
|00001010| 0b 82 85 00 0e 0c 0e 09 | ce 49 88 82 85 00 0e 0d |........|.I......|
|00001020| 0e 09 48 c0 55 84 6f 00 | 0e 0c 0e 09 ce 49 88 82 |..H.U.o.|.....I..|
|00001030| 85 00 0e 5c 6e cf 0e 5c | 6e 54 89 16 5c 6e 21 55 |...\n..\|nT..\n!U|
|00001040| 83 85 00 0e 09 16 07 0e | 06 16 0b 0e 09 54 89 16 |........|.....T..|
|00001050| 09 82 1a 00 0e 07 2e 06 | 87 22 20 5b 30 20 67 6f |........|." [0 go|
|00001060| 6d 6f 6b 75 2d 78 79 2d | 74 6f 2d 69 6e 64 65 78 |moku-xy-|to-index|
|00001070| 20 31 20 67 6f 6d 6f 6b | 75 2d 62 6f 61 72 64 2d | 1 gomok|u-board-|
|00001080| 77 69 64 74 68 20 67 6f | 6d 6f 6b 75 2d 62 6f 61 |width go|moku-boa|
|00001090| 72 64 2d 68 65 69 67 68 | 74 20 6e 69 6c 20 73 63 |rd-heigh|t nil sc|
|000010a0| 6f 72 65 20 62 65 73 74 | 2d 73 71 75 61 72 65 20 |ore best|-square |
|000010b0| 65 6e 64 20 73 71 75 61 | 72 65 20 63 6f 75 6e 74 |end squa|re count|
|000010c0| 20 73 63 6f 72 65 2d 6d | 61 78 20 67 6f 6d 6f 6b | score-m|ax gomok|
|000010d0| 75 2d 73 63 6f 72 65 2d | 74 61 62 6c 65 20 67 6f |u-score-|table go|
|000010e0| 6d 6f 6b 75 2d 62 6f 61 | 72 64 20 2d 31 20 72 61 |moku-boa|rd -1 ra|
|000010f0| 6e 64 6f 6d 2d 6e 75 6d | 62 65 72 5d 20 37 20 22 |ndom-num|ber] 7 "|
|00001100| 5c 0a 43 6f 6d 70 75 74 | 65 20 69 6e 64 65 78 20 |\.Comput|e index |
|00001110| 6f 66 20 66 72 65 65 20 | 73 71 75 61 72 65 20 77 |of free |square w|
|00001120| 69 74 68 20 68 69 67 68 | 65 73 74 20 73 63 6f 72 |ith high|est scor|
|00001130| 65 2c 20 6f 72 20 6e 69 | 6c 20 69 66 20 6e 6f 6e |e, or ni|l if non|
|00001140| 65 2e 22 5d 29 0a 28 64 | 65 66 61 6c 69 61 73 20 |e."]).(d|efalias |
|00001150| 27 72 61 6e 64 6f 6d 2d | 6e 75 6d 62 65 72 20 23 |'random-|number #|
|00001160| 5b 28 6e 29 20 22 c0 20 | 09 a6 89 11 c2 57 83 0e |[(n) ". |.....W..|
|00001170| 00 09 5b 87 09 87 22 20 | 5b 72 61 6e 64 6f 6d 20 |..[..." |[random |
|00001180| 6e 20 30 5d 20 33 20 22 | 5c 0a 52 65 74 75 72 6e |n 0] 3 "|\.Return|
|00001190| 20 61 20 72 61 6e 64 6f | 6d 20 69 6e 74 65 67 65 | a rando|m intege|
|000011a0| 72 20 62 65 74 77 65 65 | 6e 20 30 20 61 6e 64 20 |r betwee|n 0 and |
|000011b0| 4e 2d 31 20 69 6e 63 6c | 75 73 69 76 65 2e 22 5d |N-1 incl|usive."]|
|000011c0| 29 0a 28 64 65 66 76 61 | 72 20 67 6f 6d 6f 6b 75 |).(defva|r gomoku|
|000011d0| 2d 73 61 76 65 64 2d 73 | 63 6f 72 65 2d 74 61 62 |-saved-s|core-tab|
|000011e0| 6c 65 20 6e 69 6c 20 22 | 5c 0a 52 65 63 6f 72 64 |le nil "|\.Record|
|000011f0| 65 64 20 69 6e 69 74 69 | 61 6c 20 76 61 6c 75 65 |ed initi|al value|
|00001200| 20 6f 66 20 70 72 65 76 | 69 6f 75 73 20 73 63 6f | of prev|ious sco|
|00001210| 72 65 20 74 61 62 6c 65 | 2e 22 29 0a 28 64 65 66 |re table|.").(def|
|00001220| 76 61 72 20 67 6f 6d 6f | 6b 75 2d 73 61 76 65 64 |var gomo|ku-saved|
|00001230| 2d 62 6f 61 72 64 2d 77 | 69 64 74 68 20 6e 69 6c |-board-w|idth nil|
|00001240| 20 22 5c 0a 52 65 63 6f | 72 64 65 64 20 76 61 6c | "\.Reco|rded val|
|00001250| 75 65 20 6f 66 20 70 72 | 65 76 69 6f 75 73 20 62 |ue of pr|evious b|
|00001260| 6f 61 72 64 20 77 69 64 | 74 68 2e 22 29 0a 28 64 |oard wid|th.").(d|
|00001270| 65 66 76 61 72 20 67 6f | 6d 6f 6b 75 2d 73 61 76 |efvar go|moku-sav|
|00001280| 65 64 2d 62 6f 61 72 64 | 2d 68 65 69 67 68 74 20 |ed-board|-height |
|00001290| 6e 69 6c 20 22 5c 0a 52 | 65 63 6f 72 64 65 64 20 |nil "\.R|ecorded |
|000012a0| 76 61 6c 75 65 20 6f 66 | 20 70 72 65 76 69 6f 75 |value of| previou|
|000012b0| 73 20 62 6f 61 72 64 20 | 68 65 69 67 68 74 2e 22 |s board |height."|
|000012c0| 29 0a 28 64 65 66 61 6c | 69 61 73 20 27 67 6f 6d |).(defal|ias 'gom|
|000012d0| 6f 6b 75 2d 69 6e 69 74 | 2d 73 63 6f 72 65 2d 74 |oku-init|-score-t|
|000012e0| 61 62 6c 65 20 23 5b 6e | 69 6c 20 22 08 83 17 00 |able #[n|il "....|
|000012f0| 09 5c 6e 55 83 17 00 0b | 0c 55 83 17 00 c5 08 21 |.\nU....|.U.....!|
|00001300| 89 16 06 87 c7 0e 08 0e | 09 ca 5f 5c 22 16 06 cb |........|.._\"...|
|00001310| 89 89 89 89 89 1e 0c 1e | 0d 1e 0e 1e 0f 1e 10 1e |........|........|
|00001320| 11 09 54 d2 a5 16 0f 0b | 54 d2 a5 16 0e d3 0e 0f |..T.....|T.......|
|00001330| 5e 16 0d d3 0e 0e 5e 16 | 0c d4 16 11 d4 0e 0d 58 |^.....^.|.......X|
|00001340| 83 78 00 d4 16 10 d4 0e | 0e 58 83 6f 00 d5 0e 11 |.x......|.X.o....|
|00001350| 0e 10 5c 22 88 0e 10 54 | 89 16 10 82 59 00 0e 11 |..\"...T|....Y...|
|00001360| 54 89 16 11 82 4f 00 0e | 11 0e 0f 58 83 a3 00 d4 |T....O..|...X....|
|00001370| 16 10 d4 0e 0c 58 83 9a | 00 d5 0e 11 0e 10 5c 22 |.....X..|......\"|
|00001380| 88 0e 10 54 89 16 10 82 | 84 00 0e 11 54 89 16 11 |...T....|....T...|
|00001390| 82 7a 00 2e 06 c5 0e 06 | 21 10 09 12 0b 89 14 87 |.z......|!.......|
|000013a0| 22 20 5b 67 6f 6d 6f 6b | 75 2d 73 61 76 65 64 2d |" [gomok|u-saved-|
|000013b0| 73 63 6f 72 65 2d 74 61 | 62 6c 65 20 67 6f 6d 6f |score-ta|ble gomo|
|000013c0| 6b 75 2d 62 6f 61 72 64 | 2d 77 69 64 74 68 20 67 |ku-board|-width g|
|000013d0| 6f 6d 6f 6b 75 2d 73 61 | 76 65 64 2d 62 6f 61 72 |omoku-sa|ved-boar|
|000013e0| 64 2d 77 69 64 74 68 20 | 67 6f 6d 6f 6b 75 2d 62 |d-width |gomoku-b|
|000013f0| 6f 61 72 64 2d 68 65 69 | 67 68 74 20 67 6f 6d 6f |oard-hei|ght gomo|
|00001400| 6b 75 2d 73 61 76 65 64 | 2d 62 6f 61 72 64 2d 68 |ku-saved|-board-h|
|00001410| 65 69 67 68 74 20 63 6f | 70 79 2d 73 65 71 75 65 |eight co|py-seque|
|00001420| 6e 63 65 20 67 6f 6d 6f | 6b 75 2d 73 63 6f 72 65 |nce gomo|ku-score|
|00001430| 2d 74 61 62 6c 65 20 6d | 61 6b 65 2d 76 65 63 74 |-table m|ake-vect|
|00001440| 6f 72 20 67 6f 6d 6f 6b | 75 2d 76 65 63 74 6f 72 |or gomok|u-vector|
|00001450| 2d 6c 65 6e 67 74 68 20 | 6e 69 6c 2d 73 63 6f 72 |-length |nil-scor|
|00001460| 65 20 32 30 20 6e 69 6c | 20 6d 61 78 6a 32 20 6d |e 20 nil| maxj2 m|
|00001470| 61 78 69 32 20 6d 61 78 | 6a 20 6d 61 78 69 20 6a |axi2 max|j maxi j|
|00001480| 20 69 20 32 20 34 20 31 | 20 67 6f 6d 6f 6b 75 2d | i 2 4 1| gomoku-|
|00001490| 69 6e 69 74 2d 73 71 75 | 61 72 65 2d 73 63 6f 72 |init-squ|are-scor|
|000014a0| 65 5d 20 37 20 22 5c 0a | 43 72 65 61 74 65 20 74 |e] 7 "\.|Create t|
|000014b0| 68 65 20 73 63 6f 72 65 | 20 74 61 62 6c 65 20 76 |he score| table v|
|000014c0| 65 63 74 6f 72 20 61 6e | 64 20 66 69 6c 6c 20 69 |ector an|d fill i|
|000014d0| 74 20 77 69 74 68 20 69 | 6e 69 74 69 61 6c 20 76 |t with i|nitial v|
|000014e0| 61 6c 75 65 73 2e 22 5d | 29 0a 28 64 65 66 61 6c |alues."]|).(defal|
|000014f0| 69 61 73 20 27 67 6f 6d | 6f 6b 75 2d 6e 62 2d 71 |ias 'gom|oku-nb-q|
|00001500| 74 75 70 6c 65 73 20 23 | 5b 28 69 20 6a 29 20 22 |tuples #|[(i j) "|
|00001510| c0 09 53 5e c0 5c 6e 09 | 5a 5e c0 0b 53 5e c0 0c |..S^.\n.|Z^..S^..|
|00001520| 0b 5a 5e 1d 1e 06 1e 07 | 89 1e 08 0e 07 5c 5c c9 |.Z^.....|.....\\.|
|00001530| 5d ca 5e 0e 06 0d 5c 5c | c9 5d ca 5e 0e 08 0e 06 |].^...\\|.].^....|
|00001540| 5e 0e 07 0d 5e 5c 5c c9 | 5d ca 5e 0e 07 0e 06 5e |^...^\\.|].^....^|
|00001550| 0e 08 0d 5e 5c 5c c9 5d | ca 5e cb 5c 5c 5c 5c 5c |...^\\.]|.^.\\\\\|
|00001560| 5c 5c 5c 2c 87 22 20 5b | 34 20 69 20 67 6f 6d 6f |\\\,." [|4 i gomo|
|00001570| 6b 75 2d 62 6f 61 72 64 | 2d 77 69 64 74 68 20 6a |ku-board|-width j|
|00001580| 20 67 6f 6d 6f 6b 75 2d | 62 6f 61 72 64 2d 68 65 | gomoku-|board-he|
|00001590| 69 67 68 74 20 64 6f 77 | 6e 20 75 70 20 72 69 67 |ight dow|n up rig|
|000015a0| 68 74 20 6c 65 66 74 20 | 33 20 38 20 2d 31 32 5d |ht left |3 8 -12]|
|000015b0| 20 37 20 22 5c 0a 52 65 | 74 75 72 6e 20 74 68 65 | 7 "\.Re|turn the|
|000015c0| 20 6e 75 6d 62 65 72 20 | 6f 66 20 71 74 75 70 6c | number |of qtupl|
|000015d0| 65 73 20 63 6f 6e 74 61 | 69 6e 69 6e 67 20 73 71 |es conta|ining sq|
|000015e0| 75 61 72 65 20 49 2c 4a | 2e 22 5d 29 0a 28 64 65 |uare I,J|."]).(de|
|000015f0| 66 61 6c 69 61 73 20 27 | 67 6f 6d 6f 6b 75 2d 69 |falias '|gomoku-i|
|00001600| 6e 69 74 2d 73 71 75 61 | 72 65 2d 73 63 6f 72 65 |nit-squa|re-score|
|00001610| 20 23 5b 28 69 20 6a 29 | 20 22 08 09 5a 54 5c 6e | #[(i j)| "..ZT\n|
|00001620| 0b 5a 54 c4 09 0b 5c 22 | 0d c6 48 5f 1e 07 1e 08 |.ZT...\"|..H_....|
|00001630| 1e 09 0e 5c 6e cb 09 0b | 5c 22 0e 07 49 88 0e 5c |...\n...|\"..I..\|
|00001640| 6e cb 0e 09 0b 5c 22 0e | 07 49 88 0e 5c 6e cb 09 |n....\".|.I..\n..|
|00001650| 0e 08 5c 22 0e 07 49 88 | 0e 5c 6e cb 0e 09 0e 08 |..\"..I.|.\n.....|
|00001660| 5c 22 0e 07 49 2b 87 22 | 20 5b 67 6f 6d 6f 6b 75 |\"..I+."| [gomoku|
|00001670| 2d 62 6f 61 72 64 2d 77 | 69 64 74 68 20 69 20 67 |-board-w|idth i g|
|00001680| 6f 6d 6f 6b 75 2d 62 6f | 61 72 64 2d 68 65 69 67 |omoku-bo|ard-heig|
|00001690| 68 74 20 6a 20 67 6f 6d | 6f 6b 75 2d 6e 62 2d 71 |ht j gom|oku-nb-q|
|000016a0| 74 75 70 6c 65 73 20 67 | 6f 6d 6f 6b 75 2d 73 63 |tuples g|omoku-sc|
|000016b0| 6f 72 65 2d 74 72 61 6e | 73 2d 74 61 62 6c 65 20 |ore-tran|s-table |
|000016c0| 30 20 73 63 20 6a 6a 20 | 69 69 20 67 6f 6d 6f 6b |0 sc jj |ii gomok|
|000016d0| 75 2d 73 63 6f 72 65 2d | 74 61 62 6c 65 20 67 6f |u-score-|table go|
|000016e0| 6d 6f 6b 75 2d 78 79 2d | 74 6f 2d 69 6e 64 65 78 |moku-xy-|to-index|
|000016f0| 5d 20 35 20 22 5c 0a 47 | 69 76 65 20 69 6e 69 74 |] 5 "\.G|ive init|
|00001700| 69 61 6c 20 73 63 6f 72 | 65 20 74 6f 20 73 71 75 |ial scor|e to squ|
|00001710| 61 72 65 20 49 2c 4a 20 | 61 6e 64 20 74 6f 20 69 |are I,J |and to i|
|00001720| 74 73 20 6d 69 72 72 6f | 72 20 69 6d 61 67 65 73 |ts mirro|r images|
|00001730| 2e 22 5d 29 0a 28 64 65 | 66 61 6c 69 61 73 20 27 |."]).(de|falias '|
|00001740| 67 6f 6d 6f 6b 75 2d 75 | 70 64 61 74 65 2d 73 63 |gomoku-u|pdate-sc|
|00001750| 6f 72 65 2d 74 61 62 6c | 65 20 23 5b 28 73 71 75 |ore-tabl|e #[(squ|
|00001760| 61 72 65 20 64 76 61 6c | 29 20 22 c0 09 21 1a c3 |are dval|) "..!..|
|00001770| 09 21 1c c5 c6 5c 6e 5a | 5d 1e 07 c5 c6 0c 5a 5d |.!...\nZ|].....Z]|
|00001780| 1e 08 c9 0e 5c 6e 5c 6e | 5a cb 5a 5e 1e 0c c9 0e |....\n\n|Z.Z^....|
|00001790| 0d 0c 5a cb 5a 5e 1e 0e | cf 0e 07 0e 0c 09 c6 c9 |..Z.Z^..|........|
|000017a0| 0e 10 26 06 88 cf 0e 08 | 0e 0e 09 c9 c6 0e 10 26 |..&.....|.......&|
|000017b0| 06 88 cf 0e 07 0e 08 5d | 0e 0c 0e 0e 5e 09 c6 89 |.......]|....^...|
|000017c0| 0e 10 26 06 88 cf c6 0c | 5a c5 5c 6e 0e 5c 6e 5a |..&.....|Z.\n.\nZ|
|000017d0| 5d 5d c9 5c 6e d1 5a 0e | 0d 0c 5a cb 5a 5e 5e 09 |]].\n.Z.|..Z.Z^^.|
|000017e0| d2 c6 0e 10 26 06 2e 06 | 87 22 20 5b 67 6f 6d 6f |....&...|." [gomo|
|000017f0| 6b 75 2d 69 6e 64 65 78 | 2d 74 6f 2d 78 20 73 71 |ku-index|-to-x sq|
|00001800| 75 61 72 65 20 78 20 67 | 6f 6d 6f 6b 75 2d 69 6e |uare x g|omoku-in|
|00001810| 64 65 78 2d 74 6f 2d 79 | 20 79 20 2d 34 20 31 20 |dex-to-y| y -4 1 |
|00001820| 69 6d 69 6e 20 6a 6d 69 | 6e 20 30 20 67 6f 6d 6f |imin jmi|n 0 gomo|
|00001830| 6b 75 2d 62 6f 61 72 64 | 2d 77 69 64 74 68 20 34 |ku-board|-width 4|
|00001840| 20 69 6d 61 78 20 67 6f | 6d 6f 6b 75 2d 62 6f 61 | imax go|moku-boa|
|00001850| 72 64 2d 68 65 69 67 68 | 74 20 6a 6d 61 78 20 67 |rd-heigh|t jmax g|
|00001860| 6f 6d 6f 6b 75 2d 75 70 | 64 61 74 65 2d 73 63 6f |omoku-up|date-sco|
|00001870| 72 65 2d 69 6e 2d 64 69 | 72 65 63 74 69 6f 6e 20 |re-in-di|rection |
|00001880| 64 76 61 6c 20 35 20 2d | 31 5d 20 37 20 22 5c 0a |dval 5 -|1] 7 "\.|
|00001890| 55 70 64 61 74 65 20 73 | 63 6f 72 65 20 74 61 62 |Update s|core tab|
|000018a0| 6c 65 20 61 66 74 65 72 | 20 53 51 55 41 52 45 20 |le after| SQUARE |
|000018b0| 72 65 63 65 69 76 65 64 | 20 61 20 44 56 41 4c 20 |received| a DVAL |
|000018c0| 69 6e 63 72 65 6d 65 6e | 74 2e 22 5d 29 0a 28 64 |incremen|t."]).(d|
|000018d0| 65 66 61 6c 69 61 73 20 | 27 67 6f 6d 6f 6b 75 2d |efalias |'gomoku-|
|000018e0| 75 70 64 61 74 65 2d 73 | 63 6f 72 65 2d 69 6e 2d |update-s|core-in-|
|000018f0| 64 69 72 65 63 74 69 6f | 6e 20 23 5b 28 6c 65 66 |directio|n #[(lef|
|00001900| 74 20 72 69 67 68 74 20 | 73 71 75 61 72 65 20 64 |t right |square d|
|00001910| 78 20 64 79 20 64 76 61 | 6c 29 20 22 08 09 56 86 |x dy dva|l) "..V.|
|00001920| be 00 c2 89 89 89 89 89 | 1b 1c 1d 1e 06 1e 07 1e |........|........|
|00001930| 08 c9 0e 5c 6e 0e 0b 5c | 22 16 08 0e 0c 08 0e 08 |...\n..\|".......|
|00001940| 5f 5c 5c 16 07 0e 0c 09 | 0e 08 5f 5c 5c 16 06 0e |_\\.....|.._\\...|
|00001950| 07 0e 08 cd 5f 5c 5c 15 | 0e 07 16 0c ce 14 0e 0c |...._\\.|........|
|00001960| 0d 58 83 57 00 0c 0e 0f | 0e 0c 48 5c 5c 14 0e 0c |.X.W....|..H\\...|
|00001970| 0e 08 5c 5c 89 16 0c 82 | 3f 00 0e 07 0e 06 58 85 |..\\....|?.....X.|
|00001980| bc 00 0e 10 0c 48 0e 10 | 0c 0e 11 5a 48 5a 89 13 |.....H..|...ZHZ..|
|00001990| ce 55 84 9e 00 0e 07 89 | 16 0c 0d 58 83 9e 00 0e |.U......|...X....|
|000019a0| 0f 0e 0c 48 ce 55 83 93 | 00 0e 12 0e 0c 0e 12 0e |...H.U..|........|
|000019b0| 0c 48 0b 5c 5c 49 88 0e | 0c 0e 08 5c 5c 89 16 0c |.H.\\I..|...\\...|
|000019c0| 82 77 00 0d 0e 08 5c 5c | 15 0c 0e 0f 0e 07 48 5b |.w....\\|......H[|
|000019d0| 0e 0f 0d 48 5c 5c 5c 5c | 14 0e 07 0e 08 5c 5c 89 |...H\\\\|.....\\.|
|000019e0| 16 07 82 59 00 2e 06 87 | 22 20 5b 6c 65 66 74 20 |...Y....|" [left |
|000019f0| 72 69 67 68 74 20 6e 69 | 6c 20 64 65 6c 74 61 20 |right ni|l delta |
|00001a00| 63 6f 75 6e 74 20 73 71 | 75 61 72 65 32 20 73 71 |count sq|uare2 sq|
|00001a10| 75 61 72 65 31 20 73 71 | 75 61 72 65 30 20 64 65 |uare1 sq|uare0 de|
|00001a20| 70 6c 20 67 6f 6d 6f 6b | 75 2d 78 79 2d 74 6f 2d |pl gomok|u-xy-to-|
|00001a30| 69 6e 64 65 78 20 64 78 | 20 64 79 20 73 71 75 61 |index dx| dy squa|
|00001a40| 72 65 20 34 20 30 20 67 | 6f 6d 6f 6b 75 2d 62 6f |re 4 0 g|omoku-bo|
|00001a50| 61 72 64 20 67 6f 6d 6f | 6b 75 2d 73 63 6f 72 65 |ard gomo|ku-score|
|00001a60| 2d 74 72 61 6e 73 2d 74 | 61 62 6c 65 20 64 76 61 |-trans-t|able dva|
|00001a70| 6c 20 67 6f 6d 6f 6b 75 | 2d 73 63 6f 72 65 2d 74 |l gomoku|-score-t|
|00001a80| 61 62 6c 65 5d 20 37 20 | 22 5c 0a 55 70 64 61 74 |able] 7 |"\.Updat|
|00001a90| 65 20 73 63 6f 72 65 73 | 20 66 6f 72 20 61 6c 6c |e scores| for all|
|00001aa0| 20 73 71 75 61 72 65 73 | 20 69 6e 20 74 68 65 20 | squares| in the |
|00001ab0| 71 74 75 70 6c 65 73 20 | 73 74 61 72 74 69 6e 67 |qtuples |starting|
|00001ac0| 20 62 65 74 77 65 65 6e | 20 74 68 65 20 4c 45 46 | between| the LEF|
|00001ad0| 54 74 68 0a 73 71 75 61 | 72 65 20 61 6e 64 20 74 |Tth.squa|re and t|
|00001ae0| 68 65 20 52 49 47 48 54 | 74 68 20 61 66 74 65 72 |he RIGHT|th after|
|00001af0| 20 53 51 55 41 52 45 2c | 20 61 6c 6f 6e 67 20 74 | SQUARE,| along t|
|00001b00| 68 65 20 44 58 2c 20 44 | 59 20 64 69 72 65 63 74 |he DX, D|Y direct|
|00001b10| 69 6f 6e 2c 20 63 6f 6e | 73 69 64 65 72 69 6e 67 |ion, con|sidering|
|00001b20| 0a 74 68 61 74 20 44 56 | 41 4c 20 68 61 73 20 62 |.that DV|AL has b|
|00001b30| 65 65 6e 20 61 64 64 65 | 64 20 6f 6e 20 53 51 55 |een adde|d on SQU|
|00001b40| 41 52 45 2e 22 5d 29 0a | 28 64 65 66 76 61 72 20 |ARE."]).|(defvar |
|00001b50| 67 6f 6d 6f 6b 75 2d 67 | 61 6d 65 2d 69 6e 2d 70 |gomoku-g|ame-in-p|
|00001b60| 72 6f 67 72 65 73 73 20 | 6e 69 6c 20 22 5c 0a 4e |rogress |nil "\.N|
|00001b70| 6f 6e 2d 6e 69 6c 20 69 | 66 20 61 20 67 61 6d 65 |on-nil i|f a game|
|00001b80| 20 69 73 20 69 6e 20 70 | 72 6f 67 72 65 73 73 2e | is in p|rogress.|
|00001b90| 22 29 0a 28 64 65 66 76 | 61 72 20 67 6f 6d 6f 6b |").(defv|ar gomok|
|00001ba0| 75 2d 67 61 6d 65 2d 68 | 69 73 74 6f 72 79 20 6e |u-game-h|istory n|
|00001bb0| 69 6c 20 22 5c 0a 41 20 | 72 65 63 6f 72 64 20 6f |il "\.A |record o|
|00001bc0| 66 20 61 6c 6c 20 6d 6f | 76 65 73 20 74 68 61 74 |f all mo|ves that|
|00001bd0| 20 68 61 76 65 20 62 65 | 65 6e 20 70 6c 61 79 65 | have be|en playe|
|00001be0| 64 20 64 75 72 69 6e 67 | 20 63 75 72 72 65 6e 74 |d during| current|
|00001bf0| 20 67 61 6d 65 2e 22 29 | 0a 28 64 65 66 76 61 72 | game.")|.(defvar|
|00001c00| 20 67 6f 6d 6f 6b 75 2d | 6e 75 6d 62 65 72 2d 6f | gomoku-|number-o|
|00001c10| 66 2d 6d 6f 76 65 73 20 | 6e 69 6c 20 22 5c 0a 4e |f-moves |nil "\.N|
|00001c20| 75 6d 62 65 72 20 6f 66 | 20 6d 6f 76 65 73 20 61 |umber of| moves a|
|00001c30| 6c 72 65 61 64 79 20 70 | 6c 61 79 65 64 20 69 6e |lready p|layed in|
|00001c40| 20 63 75 72 72 65 6e 74 | 20 67 61 6d 65 2e 22 29 | current| game.")|
|00001c50| 0a 28 64 65 66 76 61 72 | 20 67 6f 6d 6f 6b 75 2d |.(defvar| gomoku-|
|00001c60| 6e 75 6d 62 65 72 2d 6f | 66 2d 68 75 6d 61 6e 2d |number-o|f-human-|
|00001c70| 6d 6f 76 65 73 20 6e 69 | 6c 20 22 5c 0a 4e 75 6d |moves ni|l "\.Num|
|00001c80| 62 65 72 20 6f 66 20 6d | 6f 76 65 73 20 61 6c 72 |ber of m|oves alr|
|00001c90| 65 61 64 79 20 70 6c 61 | 79 65 64 20 62 79 20 68 |eady pla|yed by h|
|00001ca0| 75 6d 61 6e 20 69 6e 20 | 63 75 72 72 65 6e 74 20 |uman in |current |
|00001cb0| 67 61 6d 65 2e 22 29 0a | 28 64 65 66 76 61 72 20 |game.").|(defvar |
|00001cc0| 67 6f 6d 6f 6b 75 2d 65 | 6d 61 63 73 2d 70 6c 61 |gomoku-e|macs-pla|
|00001cd0| 79 65 64 2d 66 69 72 73 | 74 20 6e 69 6c 20 22 5c |yed-firs|t nil "\|
|00001ce0| 0a 4e 6f 6e 2d 6e 69 6c | 20 69 66 20 45 6d 61 63 |.Non-nil| if Emac|
|00001cf0| 73 20 70 6c 61 79 65 64 | 20 66 69 72 73 74 2e 22 |s played| first."|
|00001d00| 29 0a 28 64 65 66 76 61 | 72 20 67 6f 6d 6f 6b 75 |).(defva|r gomoku|
|00001d10| 2d 68 75 6d 61 6e 2d 74 | 6f 6f 6b 2d 62 61 63 6b |-human-t|ook-back|
|00001d20| 20 6e 69 6c 20 22 5c 0a | 4e 6f 6e 2d 6e 69 6c 20 | nil "\.|Non-nil |
|00001d30| 69 66 20 48 75 6d 61 6e | 20 74 6f 6f 6b 20 62 61 |if Human| took ba|
|00001d40| 63 6b 20 61 20 6d 6f 76 | 65 20 64 75 72 69 6e 67 |ck a mov|e during|
|00001d50| 20 74 68 65 20 67 61 6d | 65 2e 22 29 0a 28 64 65 | the gam|e.").(de|
|00001d60| 66 76 61 72 20 67 6f 6d | 6f 6b 75 2d 68 75 6d 61 |fvar gom|oku-huma|
|00001d70| 6e 2d 72 65 66 75 73 65 | 64 2d 64 72 61 77 20 6e |n-refuse|d-draw n|
|00001d80| 69 6c 20 22 5c 0a 4e 6f | 6e 2d 6e 69 6c 20 69 66 |il "\.No|n-nil if|
|00001d90| 20 48 75 6d 61 6e 20 72 | 65 66 75 73 65 64 20 45 | Human r|efused E|
|00001da0| 6d 61 63 73 20 6f 66 66 | 65 72 20 6f 66 20 61 20 |macs off|er of a |
|00001db0| 64 72 61 77 2e 22 29 0a | 28 64 65 66 76 61 72 20 |draw.").|(defvar |
|00001dc0| 67 6f 6d 6f 6b 75 2d 65 | 6d 61 63 73 2d 69 73 2d |gomoku-e|macs-is-|
|00001dd0| 63 6f 6d 70 75 74 69 6e | 67 20 6e 69 6c 20 22 5c |computin|g nil "\|
|00001de0| 0a 4e 6f 6e 2d 6e 69 6c | 20 69 66 20 45 6d 61 63 |.Non-nil| if Emac|
|00001df0| 73 20 69 73 20 69 6e 20 | 74 68 65 20 6d 69 64 64 |s is in |the midd|
|00001e00| 6c 65 20 6f 66 20 61 20 | 63 6f 6d 70 75 74 61 74 |le of a |computat|
|00001e10| 69 6f 6e 2e 22 29 0a 28 | 64 65 66 61 6c 69 61 73 |ion.").(|defalias|
|00001e20| 20 27 67 6f 6d 6f 6b 75 | 2d 73 74 61 72 74 2d 67 | 'gomoku|-start-g|
|00001e30| 61 6d 65 20 23 5b 28 6e | 20 6d 29 20 22 c0 11 c0 |ame #[(n| m) "...|
|00001e40| 12 0b 14 0d 16 06 0d c7 | 5c 5c 0b 54 5f 54 16 08 |........|\\.T_T..|
|00001e50| 0b 0d c9 5f 5f ca a5 16 | 0b cc 16 0d ce 16 0f ce |...__...|........|
|00001e60| 16 10 cc 16 11 cc 16 12 | cc 16 13 d4 0b 0d 5c 22 |........|......\"|
|00001e70| 88 d5 20 88 d6 20 88 cc | 89 11 87 22 20 5b 74 20 |.. .. ..|..." [t |
|00001e80| 67 6f 6d 6f 6b 75 2d 65 | 6d 61 63 73 2d 69 73 2d |gomoku-e|macs-is-|
|00001e90| 63 6f 6d 70 75 74 69 6e | 67 20 67 6f 6d 6f 6b 75 |computin|g gomoku|
|00001ea0| 2d 67 61 6d 65 2d 69 6e | 2d 70 72 6f 67 72 65 73 |-game-in|-progres|
|00001eb0| 73 20 6e 20 67 6f 6d 6f | 6b 75 2d 62 6f 61 72 64 |s n gomo|ku-board|
|00001ec0| 2d 77 69 64 74 68 20 6d | 20 67 6f 6d 6f 6b 75 2d |-width m| gomoku-|
|00001ed0| 62 6f 61 72 64 2d 68 65 | 69 67 68 74 20 32 20 67 |board-he|ight 2 g|
|00001ee0| 6f 6d 6f 6b 75 2d 76 65 | 63 74 6f 72 2d 6c 65 6e |omoku-ve|ctor-len|
|00001ef0| 67 74 68 20 37 20 31 30 | 20 67 6f 6d 6f 6b 75 2d |gth 7 10| gomoku-|
|00001f00| 64 72 61 77 2d 6c 69 6d | 69 74 20 6e 69 6c 20 67 |draw-lim|it nil g|
|00001f10| 6f 6d 6f 6b 75 2d 67 61 | 6d 65 2d 68 69 73 74 6f |omoku-ga|me-histo|
|00001f20| 72 79 20 30 20 67 6f 6d | 6f 6b 75 2d 6e 75 6d 62 |ry 0 gom|oku-numb|
|00001f30| 65 72 2d 6f 66 2d 6d 6f | 76 65 73 20 67 6f 6d 6f |er-of-mo|ves gomo|
|00001f40| 6b 75 2d 6e 75 6d 62 65 | 72 2d 6f 66 2d 68 75 6d |ku-numbe|r-of-hum|
|00001f50| 61 6e 2d 6d 6f 76 65 73 | 20 67 6f 6d 6f 6b 75 2d |an-moves| gomoku-|
|00001f60| 65 6d 61 63 73 2d 70 6c | 61 79 65 64 2d 66 69 72 |emacs-pl|ayed-fir|
|00001f70| 73 74 20 67 6f 6d 6f 6b | 75 2d 68 75 6d 61 6e 2d |st gomok|u-human-|
|00001f80| 74 6f 6f 6b 2d 62 61 63 | 6b 20 67 6f 6d 6f 6b 75 |took-bac|k gomoku|
|00001f90| 2d 68 75 6d 61 6e 2d 72 | 65 66 75 73 65 64 2d 64 |-human-r|efused-d|
|00001fa0| 72 61 77 20 67 6f 6d 6f | 6b 75 2d 69 6e 69 74 2d |raw gomo|ku-init-|
|00001fb0| 64 69 73 70 6c 61 79 20 | 67 6f 6d 6f 6b 75 2d 69 |display |gomoku-i|
|00001fc0| 6e 69 74 2d 73 63 6f 72 | 65 2d 74 61 62 6c 65 20 |nit-scor|e-table |
|00001fd0| 67 6f 6d 6f 6b 75 2d 69 | 6e 69 74 2d 62 6f 61 72 |gomoku-i|nit-boar|
|00001fe0| 64 5d 20 33 20 22 5c 0a | 49 6e 69 74 69 61 6c 69 |d] 3 "\.|Initiali|
|00001ff0| 7a 65 20 61 20 6e 65 77 | 20 67 61 6d 65 20 6f 6e |ze a new| game on|
|00002000| 20 61 6e 20 4e 20 62 79 | 20 4d 20 62 6f 61 72 64 | an N by| M board|
|00002010| 2e 22 5d 29 0a 28 64 65 | 66 61 6c 69 61 73 20 27 |."]).(de|falias '|
|00002020| 67 6f 6d 6f 6b 75 2d 70 | 6c 61 79 2d 6d 6f 76 65 |gomoku-p|lay-move|
|00002030| 20 23 5b 28 73 71 75 61 | 72 65 20 76 61 6c 20 26 | #[(squa|re val &|
|00002040| 6f 70 74 69 6f 6e 61 6c | 20 64 6f 6e 74 2d 75 70 |optional| dont-up|
|00002050| 64 61 74 65 2d 73 63 6f | 72 65 29 20 22 c0 11 5c |date-sco|re) "..\|
|00002060| 6e c3 55 83 0e 00 0c 54 | 14 82 17 00 0d c6 55 83 |n.U....T|......U.|
|00002070| 17 00 c0 16 07 0e 08 0e | 09 0e 08 48 42 0e 5c 6e |........|...HB.\n|
|00002080| 42 16 5c 6e 0d 54 15 cb | 0e 08 5c 6e 5c 22 88 0e |B.\n.T..|..\n\"..|
|00002090| 0c 0e 08 5c 6e 49 88 0e | 0d 84 46 00 ce 0e 08 5c |...\nI..|..F....\|
|000020a0| 6e 5c 22 88 0e 09 0e 08 | cf 49 88 d0 89 11 87 22 |n\".....|.I....."|
|000020b0| 20 5b 74 20 67 6f 6d 6f | 6b 75 2d 65 6d 61 63 73 | [t gomo|ku-emacs|
|000020c0| 2d 69 73 2d 63 6f 6d 70 | 75 74 69 6e 67 20 76 61 |-is-comp|uting va|
|000020d0| 6c 20 31 20 67 6f 6d 6f | 6b 75 2d 6e 75 6d 62 65 |l 1 gomo|ku-numbe|
|000020e0| 72 2d 6f 66 2d 68 75 6d | 61 6e 2d 6d 6f 76 65 73 |r-of-hum|an-moves|
|000020f0| 20 67 6f 6d 6f 6b 75 2d | 6e 75 6d 62 65 72 2d 6f | gomoku-|number-o|
|00002100| 66 2d 6d 6f 76 65 73 20 | 30 20 67 6f 6d 6f 6b 75 |f-moves |0 gomoku|
|00002110| 2d 65 6d 61 63 73 2d 70 | 6c 61 79 65 64 2d 66 69 |-emacs-p|layed-fi|
|00002120| 72 73 74 20 73 71 75 61 | 72 65 20 67 6f 6d 6f 6b |rst squa|re gomok|
|00002130| 75 2d 73 63 6f 72 65 2d | 74 61 62 6c 65 20 67 6f |u-score-|table go|
|00002140| 6d 6f 6b 75 2d 67 61 6d | 65 2d 68 69 73 74 6f 72 |moku-gam|e-histor|
|00002150| 79 20 67 6f 6d 6f 6b 75 | 2d 70 6c 6f 74 2d 73 71 |y gomoku|-plot-sq|
|00002160| 75 61 72 65 20 67 6f 6d | 6f 6b 75 2d 62 6f 61 72 |uare gom|oku-boar|
|00002170| 64 20 64 6f 6e 74 2d 75 | 70 64 61 74 65 2d 73 63 |d dont-u|pdate-sc|
|00002180| 6f 72 65 20 67 6f 6d 6f | 6b 75 2d 75 70 64 61 74 |ore gomo|ku-updat|
|00002190| 65 2d 73 63 6f 72 65 2d | 74 61 62 6c 65 20 2d 31 |e-score-|table -1|
|000021a0| 20 6e 69 6c 5d 20 33 20 | 22 5c 0a 47 6f 20 74 6f | nil] 3 |"\.Go to|
|000021b0| 20 53 51 55 41 52 45 2c | 20 70 6c 61 79 20 56 41 | SQUARE,| play VA|
|000021c0| 4c 20 61 6e 64 20 75 70 | 64 61 74 65 20 65 76 65 |L and up|date eve|
|000021d0| 72 79 74 68 69 6e 67 2e | 22 5d 29 0a 28 64 65 66 |rything.|"]).(def|
|000021e0| 61 6c 69 61 73 20 27 67 | 6f 6d 6f 6b 75 2d 74 61 |alias 'g|omoku-ta|
|000021f0| 6b 65 2d 62 61 63 6b 20 | 23 5b 6e 69 6c 20 22 c0 |ke-back |#[nil ".|
|00002200| 11 5c 6e 40 89 1b 40 1c | 0d 0c 48 89 1e 06 c7 55 |.\n@..@.|..H....U|
|00002210| 83 18 00 0e 08 53 16 08 | 5c 6e 41 12 0e 09 53 16 |.....S..|\nA...S.|
|00002220| 09 ca 0c cb 5c 22 88 0d | 0c cb 49 88 cc 0c 0e 06 |....\"..|..I.....|
|00002230| 5b 5c 22 88 0e 0d 0c 0b | 41 49 88 2b ce 89 11 87 |[\".....|AI.+....|
|00002240| 22 20 5b 74 20 67 6f 6d | 6f 6b 75 2d 65 6d 61 63 |" [t gom|oku-emac|
|00002250| 73 2d 69 73 2d 63 6f 6d | 70 75 74 69 6e 67 20 67 |s-is-com|puting g|
|00002260| 6f 6d 6f 6b 75 2d 67 61 | 6d 65 2d 68 69 73 74 6f |omoku-ga|me-histo|
|00002270| 72 79 20 6c 61 73 74 2d | 6d 6f 76 65 20 73 71 75 |ry last-|move squ|
|00002280| 61 72 65 20 67 6f 6d 6f | 6b 75 2d 62 6f 61 72 64 |are gomo|ku-board|
|00002290| 20 6f 6c 64 76 61 6c 20 | 31 20 67 6f 6d 6f 6b 75 | oldval |1 gomoku|
|000022a0| 2d 6e 75 6d 62 65 72 2d | 6f 66 2d 68 75 6d 61 6e |-number-|of-human|
|000022b0| 2d 6d 6f 76 65 73 20 67 | 6f 6d 6f 6b 75 2d 6e 75 |-moves g|omoku-nu|
|000022c0| 6d 62 65 72 2d 6f 66 2d | 6d 6f 76 65 73 20 67 6f |mber-of-|moves go|
|000022d0| 6d 6f 6b 75 2d 70 6c 6f | 74 2d 73 71 75 61 72 65 |moku-plo|t-square|
|000022e0| 20 30 20 67 6f 6d 6f 6b | 75 2d 75 70 64 61 74 65 | 0 gomok|u-update|
|000022f0| 2d 73 63 6f 72 65 2d 74 | 61 62 6c 65 20 67 6f 6d |-score-t|able gom|
|00002300| 6f 6b 75 2d 73 63 6f 72 | 65 2d 74 61 62 6c 65 20 |oku-scor|e-table |
|00002310| 6e 69 6c 5d 20 34 20 22 | 5c 0a 54 61 6b 65 20 62 |nil] 4 "|\.Take b|
|00002320| 61 63 6b 20 6c 61 73 74 | 20 6d 6f 76 65 20 61 6e |ack last| move an|
|00002330| 64 20 75 70 64 61 74 65 | 20 65 76 65 72 79 74 68 |d update| everyth|
|00002340| 69 6e 67 2e 22 5d 29 0a | 28 64 65 66 76 61 72 20 |ing."]).|(defvar |
|00002350| 67 6f 6d 6f 6b 75 2d 6e | 75 6d 62 65 72 2d 6f 66 |gomoku-n|umber-of|
|00002360| 2d 77 69 6e 73 20 30 20 | 22 5c 0a 4e 75 6d 62 65 |-wins 0 |"\.Numbe|
|00002370| 72 20 6f 66 20 67 61 6d | 65 73 20 61 6c 72 65 61 |r of gam|es alrea|
|00002380| 64 79 20 77 6f 6e 20 69 | 6e 20 74 68 69 73 20 73 |dy won i|n this s|
|00002390| 65 73 73 69 6f 6e 2e 22 | 29 0a 28 64 65 66 76 61 |ession."|).(defva|
|000023a0| 72 20 67 6f 6d 6f 6b 75 | 2d 6e 75 6d 62 65 72 2d |r gomoku|-number-|
|000023b0| 6f 66 2d 6c 6f 73 73 65 | 73 20 30 20 22 5c 0a 4e |of-losse|s 0 "\.N|
|000023c0| 75 6d 62 65 72 20 6f 66 | 20 67 61 6d 65 73 20 61 |umber of| games a|
|000023d0| 6c 72 65 61 64 79 20 6c | 6f 73 74 20 69 6e 20 74 |lready l|ost in t|
|000023e0| 68 69 73 20 73 65 73 73 | 69 6f 6e 2e 22 29 0a 28 |his sess|ion.").(|
|000023f0| 64 65 66 76 61 72 20 67 | 6f 6d 6f 6b 75 2d 6e 75 |defvar g|omoku-nu|
|00002400| 6d 62 65 72 2d 6f 66 2d | 64 72 61 77 73 20 30 20 |mber-of-|draws 0 |
|00002410| 22 5c 0a 4e 75 6d 62 65 | 72 20 6f 66 20 67 61 6d |"\.Numbe|r of gam|
|00002420| 65 73 20 61 6c 72 65 61 | 64 79 20 64 72 61 77 6e |es alrea|dy drawn|
|00002430| 20 69 6e 20 74 68 69 73 | 20 73 65 73 73 69 6f 6e | in this| session|
|00002440| 2e 22 29 0a 28 64 65 66 | 61 6c 69 61 73 20 27 67 |.").(def|alias 'g|
|00002450| 6f 6d 6f 6b 75 2d 74 65 | 72 6d 69 6e 61 74 65 2d |omoku-te|rminate-|
|00002460| 67 61 6d 65 20 23 5b 28 | 72 65 73 75 6c 74 29 20 |game #[(|result) |
|00002470| 22 c0 19 5c 6e c3 3d 83 | 4d 00 0c 54 14 0d c6 57 |"..\n.=.|M..T...W|
|00002480| 83 15 00 c7 82 49 00 0e | 08 83 1e 00 c9 82 49 00 |.....I..|......I.|
|00002490| 0e 5c 6e 83 27 00 cb 82 | 49 00 0e 0c 84 30 00 cd |.\n.'...|I....0..|
|000024a0| 82 49 00 0e 0e cf 55 83 | 48 00 0e 10 cf 55 83 48 |.I....U.|H....U.H|
|000024b0| 00 0c d1 56 83 48 00 d2 | 82 49 00 d3 11 82 c9 00 |...V.H..|.I......|
|000024c0| 5c 6e d4 3d 83 6f 00 0e | 0e 54 16 0e 0e 5c 6e 83 |\n.=.o..|.T...\n.|
|000024d0| 61 00 d5 82 6b 00 0e 0c | 83 6a 00 d6 82 6b 00 d7 |a...k...|.j...k..|
|000024e0| 11 82 c9 00 5c 6e d8 3d | 83 7d 00 0c 54 14 d9 11 |....\n.=|.}..T...|
|000024f0| 82 c9 00 5c 6e da 3d 83 | 9f 00 0e 10 54 16 10 0e |...\n.=.|....T...|
|00002500| 5c 6e 83 91 00 db 82 9b | 00 0e 0c 83 9a 00 dc 82 |\n......|........|
|00002510| 9b 00 dd 11 82 c9 00 5c | 6e de 3d 83 c1 00 0e 10 |.......\|n.=.....|
|00002520| 54 16 10 0e 5c 6e 83 b3 | 00 df 82 bd 00 0e 0c 83 |T...\n..|........|
|00002530| bc 00 e0 82 bd 00 e1 11 | 82 c9 00 5c 6e e2 3d 83 |........|...\n.=.|
|00002540| c9 00 e3 11 e4 20 88 09 | 83 d4 00 c1 09 21 88 e5 |..... ..|.....!..|
|00002550| 20 88 c0 89 16 26 29 87 | 22 20 5b 6e 69 6c 20 6d | ....&).|" [nil m|
|00002560| 65 73 73 61 67 65 20 72 | 65 73 75 6c 74 20 65 6d |essage r|esult em|
|00002570| 61 63 73 2d 77 6f 6e 20 | 67 6f 6d 6f 6b 75 2d 6e |acs-won |gomoku-n|
|00002580| 75 6d 62 65 72 2d 6f 66 | 2d 77 69 6e 73 20 67 6f |umber-of|-wins go|
|00002590| 6d 6f 6b 75 2d 6e 75 6d | 62 65 72 2d 6f 66 2d 6d |moku-num|ber-of-m|
|000025a0| 6f 76 65 73 20 32 30 20 | 22 54 68 69 73 20 77 61 |oves 20 |"This wa|
|000025b0| 73 20 61 20 52 45 41 4c | 4c 59 20 51 55 49 43 4b |s a REAL|LY QUICK|
|000025c0| 20 77 69 6e 2e 22 20 67 | 6f 6d 6f 6b 75 2d 68 75 | win." g|omoku-hu|
|000025d0| 6d 61 6e 2d 72 65 66 75 | 73 65 64 2d 64 72 61 77 |man-refu|sed-draw|
|000025e0| 20 22 49 20 77 6f 6e 2e | 2e 2e 20 54 6f 6f 20 62 | "I won.|.. Too b|
|000025f0| 61 64 20 79 6f 75 20 72 | 65 66 75 73 65 64 20 6d |ad you r|efused m|
|00002600| 79 20 6f 66 66 65 72 20 | 6f 66 20 61 20 64 72 61 |y offer |of a dra|
|00002610| 77 20 21 22 20 67 6f 6d | 6f 6b 75 2d 68 75 6d 61 |w !" gom|oku-huma|
|00002620| 6e 2d 74 6f 6f 6b 2d 62 | 61 63 6b 20 22 49 20 77 |n-took-b|ack "I w|
|00002630| 6f 6e 2e 2e 2e 20 54 61 | 6b 69 6e 67 20 6d 6f 76 |on... Ta|king mov|
|00002640| 65 73 20 62 61 63 6b 20 | 77 69 6c 6c 20 6e 6f 74 |es back |will not|
|00002650| 20 68 65 6c 70 20 79 6f | 75 20 21 22 20 67 6f 6d | help yo|u !" gom|
|00002660| 6f 6b 75 2d 65 6d 61 63 | 73 2d 70 6c 61 79 65 64 |oku-emac|s-played|
|00002670| 2d 66 69 72 73 74 20 22 | 49 20 77 6f 6e 2e 2e 2e |-first "|I won...|
|00002680| 20 50 6c 61 79 69 6e 67 | 20 66 69 72 73 74 20 64 | Playing| first d|
|00002690| 69 64 20 6e 6f 74 20 68 | 65 6c 70 20 79 6f 75 20 |id not h|elp you |
|000026a0| 6d 75 63 68 20 21 22 20 | 67 6f 6d 6f 6b 75 2d 6e |much !" |gomoku-n|
|000026b0| 75 6d 62 65 72 2d 6f 66 | 2d 6c 6f 73 73 65 73 20 |umber-of|-losses |
|000026c0| 30 20 67 6f 6d 6f 6b 75 | 2d 6e 75 6d 62 65 72 2d |0 gomoku|-number-|
|000026d0| 6f 66 2d 64 72 61 77 73 | 20 31 20 22 49 27 6d 20 |of-draws| 1 "I'm |
|000026e0| 62 65 63 6f 6d 69 6e 67 | 20 74 69 72 65 64 20 6f |becoming| tired o|
|000026f0| 66 20 77 69 6e 6e 69 6e | 67 2e 2e 2e 22 20 22 49 |f winnin|g..." "I|
|00002700| 20 77 6f 6e 2e 22 20 68 | 75 6d 61 6e 2d 77 6f 6e | won." h|uman-won|
|00002710| 20 22 4f 4b 2c 20 79 6f | 75 20 77 6f 6e 20 74 68 | "OK, yo|u won th|
|00002720| 69 73 20 6f 6e 65 2e 20 | 20 49 2c 20 66 6f 72 20 |is one. | I, for |
|00002730| 6f 6e 65 2c 20 6e 65 76 | 65 72 20 74 61 6b 65 20 |one, nev|er take |
|00002740| 6d 79 20 6d 6f 76 65 73 | 20 62 61 63 6b 2e 2e 2e |my moves| back...|
|00002750| 22 20 22 4f 4b 2c 20 79 | 6f 75 20 77 6f 6e 20 74 |" "OK, y|ou won t|
|00002760| 68 69 73 20 6f 6e 65 2e | 2e 2e 20 73 6f 20 77 68 |his one.|.. so wh|
|00002770| 61 74 20 3f 22 20 22 4f | 4b 2c 20 79 6f 75 20 77 |at ?" "O|K, you w|
|00002780| 6f 6e 20 74 68 69 73 20 | 6f 6e 65 2e 20 20 4e 6f |on this |one. No|
|00002790| 77 2c 20 6c 65 74 20 6d | 65 20 70 6c 61 79 20 66 |w, let m|e play f|
|000027a0| 69 72 73 74 20 6a 75 73 | 74 20 6f 6e 63 65 2e 22 |irst jus|t once."|
|000027b0| 20 68 75 6d 61 6e 2d 72 | 65 73 69 67 6e 65 64 20 | human-r|esigned |
|000027c0| 22 53 6f 20 79 6f 75 20 | 72 65 73 69 67 6e 2e 20 |"So you |resign. |
|000027d0| 20 54 68 61 74 27 73 20 | 6a 75 73 74 20 6f 6e 65 | That's |just one|
|000027e0| 20 6d 6f 72 65 20 77 69 | 6e 20 66 6f 72 20 6d 65 | more wi|n for me|
|000027f0| 2e 22 20 6e 6f 62 6f 64 | 79 2d 77 6f 6e 20 22 54 |." nobod|y-won "T|
|00002800| 68 69 73 20 69 73 20 61 | 20 64 72 61 77 2e 20 20 |his is a| draw. |
|00002810| 49 2c 20 66 6f 72 20 6f | 6e 65 2c 20 6e 65 76 65 |I, for o|ne, neve|
|00002820| 72 20 74 61 6b 65 20 6d | 79 20 6d 6f 76 65 73 20 |r take m|y moves |
|00002830| 62 61 63 6b 2e 2e 2e 22 | 20 22 54 68 69 73 20 69 |back..."| "This i|
|00002840| 73 20 61 20 64 72 61 77 | 2e 20 20 4a 75 73 74 20 |s a draw|. Just |
|00002850| 63 68 61 6e 63 65 2c 20 | 49 20 67 75 65 73 73 2e |chance, |I guess.|
|00002860| 22 20 22 54 68 69 73 20 | 69 73 20 61 20 64 72 61 |" "This |is a dra|
|00002870| 77 2e 20 20 4e 6f 77 2c | 20 6c 65 74 20 6d 65 20 |w. Now,| let me |
|00002880| 70 6c 61 79 20 66 69 72 | 73 74 20 6a 75 73 74 20 |play fir|st just |
|00002890| 6f 6e 63 65 2e 22 20 64 | 72 61 77 2d 61 67 72 65 |once." d|raw-agre|
|000028a0| 65 64 20 22 44 72 61 77 | 20 61 67 72 65 65 64 2e |ed "Draw| agreed.|
|000028b0| 20 20 49 2c 20 66 6f 72 | 20 6f 6e 65 2c 20 6e 65 | I, for| one, ne|
|000028c0| 76 65 72 20 74 61 6b 65 | 20 6d 79 20 6d 6f 76 65 |ver take| my move|
|000028d0| 73 20 62 61 63 6b 2e 2e | 2e 22 20 22 44 72 61 77 |s back..|." "Draw|
|000028e0| 20 61 67 72 65 65 64 2e | 20 20 59 6f 75 20 77 65 | agreed.| You we|
|000028f0| 72 65 20 6c 75 63 6b 79 | 2e 22 20 22 44 72 61 77 |re lucky|." "Draw|
|00002900| 20 61 67 72 65 65 64 2e | 20 20 4e 6f 77 2c 20 6c | agreed.| Now, l|
|00002910| 65 74 20 6d 65 20 70 6c | 61 79 20 66 69 72 73 74 |et me pl|ay first|
|00002920| 20 6a 75 73 74 20 6f 6e | 63 65 2e 22 20 63 72 61 | just on|ce." cra|
|00002930| 73 68 2d 67 61 6d 65 20 | 22 53 6f 72 72 79 2c 20 |sh-game |"Sorry, |
|00002940| 49 20 68 61 76 65 20 62 | 65 65 6e 20 69 6e 74 65 |I have b|een inte|
|00002950| 72 72 75 70 74 65 64 20 | 61 6e 64 20 63 61 6e 6e |rrupted |and cann|
|00002960| 6f 74 20 72 65 73 75 6d | 65 20 74 68 61 74 20 67 |ot resum|e that g|
|00002970| 61 6d 65 2e 2e 2e 22 20 | 67 6f 6d 6f 6b 75 2d 64 |ame..." |gomoku-d|
|00002980| 69 73 70 6c 61 79 2d 73 | 74 61 74 69 73 74 69 63 |isplay-s|tatistic|
|00002990| 73 20 64 69 6e 67 20 67 | 6f 6d 6f 6b 75 2d 67 61 |s ding g|omoku-ga|
|000029a0| 6d 65 2d 69 6e 2d 70 72 | 6f 67 72 65 73 73 5d 20 |me-in-pr|ogress] |
|000029b0| 32 20 22 5c 0a 54 65 72 | 6d 69 6e 61 74 65 20 74 |2 "\.Ter|minate t|
|000029c0| 68 65 20 63 75 72 72 65 | 6e 74 20 67 61 6d 65 20 |he curre|nt game |
|000029d0| 77 69 74 68 20 52 45 53 | 55 4c 54 2e 22 5d 29 0a |with RES|ULT."]).|
|000029e0| 28 64 65 66 61 6c 69 61 | 73 20 27 67 6f 6d 6f 6b |(defalia|s 'gomok|
|000029f0| 75 2d 63 72 61 73 68 2d | 67 61 6d 65 20 23 5b 6e |u-crash-|game #[n|
|00002a00| 69 6c 20 22 c0 11 c2 c3 | 21 88 c4 c5 21 88 c6 20 |il "....|!...!.. |
|00002a10| 87 22 20 5b 6e 69 6c 20 | 67 6f 6d 6f 6b 75 2d 65 |." [nil |gomoku-e|
|00002a20| 6d 61 63 73 2d 69 73 2d | 63 6f 6d 70 75 74 69 6e |macs-is-|computin|
|00002a30| 67 20 67 6f 6d 6f 6b 75 | 2d 74 65 72 6d 69 6e 61 |g gomoku|-termina|
|00002a40| 74 65 2d 67 61 6d 65 20 | 63 72 61 73 68 2d 67 61 |te-game |crash-ga|
|00002a50| 6d 65 20 73 69 74 2d 66 | 6f 72 20 34 20 67 6f 6d |me sit-f|or 4 gom|
|00002a60| 6f 6b 75 2d 70 72 6f 6d | 70 74 2d 66 6f 72 2d 6f |oku-prom|pt-for-o|
|00002a70| 74 68 65 72 2d 67 61 6d | 65 5d 20 32 20 22 5c 0a |ther-gam|e] 2 "\.|
|00002a80| 57 68 61 74 20 74 6f 20 | 64 6f 20 77 68 65 6e 20 |What to |do when |
|00002a90| 45 6d 61 63 73 20 64 65 | 74 65 63 74 73 20 69 74 |Emacs de|tects it|
|00002aa0| 20 68 61 73 20 62 65 65 | 6e 20 69 6e 74 65 72 72 | has bee|n interr|
|00002ab0| 75 70 74 65 64 2e 22 5d | 29 0a 28 64 65 66 61 6c |upted."]|).(defal|
|00002ac0| 69 61 73 20 27 67 6f 6d | 6f 6b 75 20 23 5b 28 26 |ias 'gom|oku #[(&|
|00002ad0| 6f 70 74 69 6f 6e 61 6c | 20 6e 20 6d 29 20 22 c0 |optional| n m) ".|
|00002ae0| 20 88 09 83 5c 6e 00 c2 | 20 87 0b 84 88 00 c4 20 | ...\n..| ...... |
|00002af0| c5 20 1e 06 1e 07 0e 08 | 84 1f 00 0e 07 16 08 0e |. ......|........|
|00002b00| 09 84 28 00 0e 06 16 09 | 0e 08 ca 57 83 36 00 cb |..(.....|...W.6..|
|00002b10| cc 21 88 82 52 00 0e 09 | ca 57 83 44 00 cb cd 21 |.!..R...|.W.D...!|
|00002b20| 88 82 52 00 0e 08 0e 07 | 56 83 52 00 cb ce 0e 08 |..R.....|V.R.....|
|00002b30| 5c 22 88 0e 09 0e 06 56 | 83 70 00 0e 09 0e 0f 9a |\".....V|.p......|
|00002b40| 84 70 00 d0 d1 d2 0e 09 | 5c 22 21 84 70 00 0e 06 |.p......|\"!.p...|
|00002b50| 16 09 2a d3 d4 21 88 d5 | 0e 08 0e 09 5c 22 88 d0 |..*..!..|....\"..|
|00002b60| d6 21 83 85 00 d7 20 87 | d8 20 87 d0 d9 21 83 91 |.!.... .|. ...!..|
|00002b70| 00 d8 20 87 da 20 87 22 | 20 5b 67 6f 6d 6f 6b 75 |.. .. ."| [gomoku|
|00002b80| 2d 73 77 69 74 63 68 2d | 74 6f 2d 77 69 6e 64 6f |-switch-|to-windo|
|00002b90| 77 20 67 6f 6d 6f 6b 75 | 2d 65 6d 61 63 73 2d 69 |w gomoku|-emacs-i|
|00002ba0| 73 2d 63 6f 6d 70 75 74 | 69 6e 67 20 67 6f 6d 6f |s-comput|ing gomo|
|00002bb0| 6b 75 2d 63 72 61 73 68 | 2d 67 61 6d 65 20 67 6f |ku-crash|-game go|
|00002bc0| 6d 6f 6b 75 2d 67 61 6d | 65 2d 69 6e 2d 70 72 6f |moku-gam|e-in-pro|
|00002bd0| 67 72 65 73 73 20 67 6f | 6d 6f 6b 75 2d 6d 61 78 |gress go|moku-max|
|00002be0| 2d 77 69 64 74 68 20 67 | 6f 6d 6f 6b 75 2d 6d 61 |-width g|omoku-ma|
|00002bf0| 78 2d 68 65 69 67 68 74 | 20 6d 61 78 2d 68 65 69 |x-height| max-hei|
|00002c00| 67 68 74 20 6d 61 78 2d | 77 69 64 74 68 20 6e 20 |ght max-|width n |
|00002c10| 6d 20 31 20 65 72 72 6f | 72 20 22 49 20 6e 65 65 |m 1 erro|r "I nee|
|00002c20| 64 20 61 74 20 6c 65 61 | 73 74 20 31 20 63 6f 6c |d at lea|st 1 col|
|00002c30| 75 6d 6e 22 20 22 49 20 | 6e 65 65 64 20 61 74 20 |umn" "I |need at |
|00002c40| 6c 65 61 73 74 20 31 20 | 72 6f 77 22 20 22 49 20 |least 1 |row" "I |
|00002c50| 63 61 6e 6e 6f 74 20 64 | 69 73 70 6c 61 79 20 25 |cannot d|isplay %|
|00002c60| 64 20 63 6f 6c 75 6d 6e | 73 20 69 6e 20 74 68 61 |d column|s in tha|
|00002c70| 74 20 77 69 6e 64 6f 77 | 22 20 67 6f 6d 6f 6b 75 |t window|" gomoku|
|00002c80| 2d 73 61 76 65 64 2d 62 | 6f 61 72 64 2d 68 65 69 |-saved-b|oard-hei|
|00002c90| 67 68 74 20 79 2d 6f 72 | 2d 6e 2d 70 20 66 6f 72 |ght y-or|-n-p for|
|00002ca0| 6d 61 74 20 22 44 6f 20 | 79 6f 75 20 72 65 61 6c |mat "Do |you real|
|00002cb0| 6c 79 20 77 61 6e 74 20 | 25 64 20 72 6f 77 73 20 |ly want |%d rows |
|00002cc0| 22 20 6d 65 73 73 61 67 | 65 20 22 4f 6e 65 20 6d |" messag|e "One m|
|00002cd0| 6f 6d 65 6e 74 2c 20 70 | 6c 65 61 73 65 2e 2e 2e |oment, p|lease...|
|00002ce0| 22 20 67 6f 6d 6f 6b 75 | 2d 73 74 61 72 74 2d 67 |" gomoku|-start-g|
|00002cf0| 61 6d 65 20 22 44 6f 20 | 79 6f 75 20 61 6c 6c 6f |ame "Do |you allo|
|00002d00| 77 20 6d 65 20 74 6f 20 | 70 6c 61 79 20 66 69 72 |w me to |play fir|
|00002d10| 73 74 20 22 20 67 6f 6d | 6f 6b 75 2d 65 6d 61 63 |st " gom|oku-emac|
|00002d20| 73 2d 70 6c 61 79 73 20 | 67 6f 6d 6f 6b 75 2d 70 |s-plays |gomoku-p|
|00002d30| 72 6f 6d 70 74 2d 66 6f | 72 2d 6d 6f 76 65 20 22 |rompt-fo|r-move "|
|00002d40| 53 68 61 6c 6c 20 77 65 | 20 63 6f 6e 74 69 6e 75 |Shall we| continu|
|00002d50| 65 20 6f 75 72 20 67 61 | 6d 65 20 22 20 67 6f 6d |e our ga|me " gom|
|00002d60| 6f 6b 75 2d 68 75 6d 61 | 6e 2d 72 65 73 69 67 6e |oku-huma|n-resign|
|00002d70| 73 5d 20 34 20 22 5c 0a | 53 74 61 72 74 20 61 20 |s] 4 "\.|Start a |
|00002d80| 47 6f 6d 6f 6b 75 20 67 | 61 6d 65 20 62 65 74 77 |Gomoku g|ame betw|
|00002d90| 65 65 6e 20 79 6f 75 20 | 61 6e 64 20 45 6d 61 63 |een you |and Emac|
|00002da0| 73 2e 0a 49 66 20 61 20 | 67 61 6d 65 20 69 73 20 |s..If a |game is |
|00002db0| 69 6e 20 70 72 6f 67 72 | 65 73 73 2c 20 74 68 69 |in progr|ess, thi|
|00002dc0| 73 20 63 6f 6d 6d 61 6e | 64 20 61 6c 6c 6f 77 20 |s comman|d allow |
|00002dd0| 79 6f 75 20 74 6f 20 72 | 65 73 75 6d 65 20 69 74 |you to r|esume it|
|00002de0| 2e 0a 49 66 20 6f 70 74 | 69 6f 6e 61 6c 20 61 72 |..If opt|ional ar|
|00002df0| 67 75 6d 65 6e 74 73 20 | 4e 20 61 6e 64 20 4d 20 |guments |N and M |
|00002e00| 61 72 65 20 67 69 76 65 | 6e 2c 20 61 6e 20 4e 20 |are give|n, an N |
|00002e10| 62 79 20 4d 20 62 6f 61 | 72 64 20 69 73 20 75 73 |by M boa|rd is us|
|00002e20| 65 64 2e 0a 0a 59 6f 75 | 20 61 6e 64 20 45 6d 61 |ed...You| and Ema|
|00002e30| 63 73 20 70 6c 61 79 20 | 69 6e 20 74 75 72 6e 20 |cs play |in turn |
|00002e40| 62 79 20 6d 61 72 6b 69 | 6e 67 20 61 20 66 72 65 |by marki|ng a fre|
|00002e50| 65 20 73 71 75 61 72 65 | 2e 20 20 59 6f 75 20 6d |e square|. You m|
|00002e60| 61 72 6b 20 69 74 20 77 | 69 74 68 20 58 0a 61 6e |ark it w|ith X.an|
|00002e70| 64 20 45 6d 61 63 73 20 | 6d 61 72 6b 73 20 69 74 |d Emacs |marks it|
|00002e80| 20 77 69 74 68 20 4f 2e | 20 54 68 65 20 77 69 6e | with O.| The win|
|00002e90| 6e 65 72 20 69 73 20 74 | 68 65 20 66 69 72 73 74 |ner is t|he first|
|00002ea0| 20 74 6f 20 67 65 74 20 | 66 69 76 65 20 63 6f 6e | to get |five con|
|00002eb0| 74 69 67 75 6f 75 73 0a | 6d 61 72 6b 73 20 68 6f |tiguous.|marks ho|
|00002ec0| 72 69 7a 6f 6e 74 61 6c | 6c 79 2c 20 76 65 72 74 |rizontal|ly, vert|
|00002ed0| 69 63 61 6c 6c 79 20 6f | 72 20 69 6e 20 64 69 61 |ically o|r in dia|
|00002ee0| 67 6f 6e 61 6c 2e 0a 0a | 59 6f 75 20 70 6c 61 79 |gonal...|You play|
|00002ef0| 20 62 79 20 6d 6f 76 69 | 6e 67 20 74 68 65 20 63 | by movi|ng the c|
|00002f00| 75 72 73 6f 72 20 6f 76 | 65 72 20 74 68 65 20 73 |ursor ov|er the s|
|00002f10| 71 75 61 72 65 20 79 6f | 75 20 63 68 6f 6f 73 65 |quare yo|u choose|
|00002f20| 20 61 6e 64 20 68 69 74 | 74 69 6e 67 0a 5c 5c 3c | and hit|ting.\\<|
|00002f30| 67 6f 6d 6f 6b 75 2d 6d | 6f 64 65 2d 6d 61 70 3e |gomoku-m|ode-map>|
|00002f40| 5c 5c 5b 67 6f 6d 6f 6b | 75 2d 68 75 6d 61 6e 2d |\\[gomok|u-human-|
|00002f50| 70 6c 61 79 73 5d 2e 0a | 55 73 65 20 5c 5c 5b 64 |plays]..|Use \\[d|
|00002f60| 65 73 63 72 69 62 65 2d | 6d 6f 64 65 5d 20 66 6f |escribe-|mode] fo|
|00002f70| 72 20 6d 6f 72 65 20 69 | 6e 66 6f 2e 22 20 6e 69 |r more i|nfo." ni|
|00002f80| 6c 5d 29 0a 28 64 65 66 | 61 6c 69 61 73 20 27 67 |l]).(def|alias 'g|
|00002f90| 6f 6d 6f 6b 75 2d 65 6d | 61 63 73 2d 70 6c 61 79 |omoku-em|acs-play|
|00002fa0| 73 20 23 5b 6e 69 6c 20 | 22 c0 20 88 09 83 5c 6e |s #[nil |". ...\n|
|00002fb0| 00 c2 20 87 0b 84 11 00 | c4 20 87 c5 c6 21 88 c7 |.. .....|. ...!..|
|00002fc0| 89 1e 08 1e 09 ca 20 89 | 16 09 84 29 00 cb cc 21 |...... .|...)...!|
|00002fd0| 82 74 00 0e 0d 0e 09 48 | 16 08 ce 0e 09 cf 5c 22 |.t.....H|......\"|
|00002fe0| 88 0e 08 0e 10 59 83 4d | 00 d1 0e 09 cf 5c 22 88 |.....Y.M|.....\".|
|00002ff0| d2 20 88 cb d3 21 82 74 | 00 0e 08 d4 55 83 5a 00 |. ...!.t|....U.Z.|
|00003000| cb cc 21 82 74 00 0e 15 | 0e 16 56 83 72 00 0e 17 |..!.t...|..V.r...|
|00003010| 84 72 00 d8 20 83 72 00 | cb d9 21 82 74 00 da 20 |.r.. .r.|..!.t.. |
|00003020| 2a 87 22 20 5b 67 6f 6d | 6f 6b 75 2d 73 77 69 74 |*." [gom|oku-swit|
|00003030| 63 68 2d 74 6f 2d 77 69 | 6e 64 6f 77 20 67 6f 6d |ch-to-wi|ndow gom|
|00003040| 6f 6b 75 2d 65 6d 61 63 | 73 2d 69 73 2d 63 6f 6d |oku-emac|s-is-com|
|00003050| 70 75 74 69 6e 67 20 67 | 6f 6d 6f 6b 75 2d 63 72 |puting g|omoku-cr|
|00003060| 61 73 68 2d 67 61 6d 65 | 20 67 6f 6d 6f 6b 75 2d |ash-game| gomoku-|
|00003070| 67 61 6d 65 2d 69 6e 2d | 70 72 6f 67 72 65 73 73 |game-in-|progress|
|00003080| 20 67 6f 6d 6f 6b 75 2d | 70 72 6f 6d 70 74 2d 66 | gomoku-|prompt-f|
|00003090| 6f 72 2d 6f 74 68 65 72 | 2d 67 61 6d 65 20 6d 65 |or-other|-game me|
|000030a0| 73 73 61 67 65 20 22 4c | 65 74 20 6d 65 20 74 68 |ssage "L|et me th|
|000030b0| 69 6e 6b 2e 2e 2e 22 20 | 6e 69 6c 20 73 63 6f 72 |ink..." |nil scor|
|000030c0| 65 20 73 71 75 61 72 65 | 20 67 6f 6d 6f 6b 75 2d |e square| gomoku-|
|000030d0| 73 74 72 6f 6e 67 65 73 | 74 2d 73 71 75 61 72 65 |stronges|t-square|
|000030e0| 20 67 6f 6d 6f 6b 75 2d | 74 65 72 6d 69 6e 61 74 | gomoku-|terminat|
|000030f0| 65 2d 67 61 6d 65 20 6e | 6f 62 6f 64 79 2d 77 6f |e-game n|obody-wo|
|00003100| 6e 20 67 6f 6d 6f 6b 75 | 2d 73 63 6f 72 65 2d 74 |n gomoku|-score-t|
|00003110| 61 62 6c 65 20 67 6f 6d | 6f 6b 75 2d 70 6c 61 79 |able gom|oku-play|
|00003120| 2d 6d 6f 76 65 20 36 20 | 67 6f 6d 6f 6b 75 2d 77 |-move 6 |gomoku-w|
|00003130| 69 6e 6e 69 6e 67 2d 74 | 68 72 65 73 68 6f 6c 64 |inning-t|hreshold|
|00003140| 20 67 6f 6d 6f 6b 75 2d | 66 69 6e 64 2d 66 69 6c | gomoku-|find-fil|
|00003150| 6c 65 64 2d 71 74 75 70 | 6c 65 20 67 6f 6d 6f 6b |led-qtup|le gomok|
|00003160| 75 2d 63 72 6f 73 73 2d | 77 69 6e 6e 69 6e 67 2d |u-cross-|winning-|
|00003170| 71 74 75 70 6c 65 20 65 | 6d 61 63 73 2d 77 6f 6e |qtuple e|macs-won|
|00003180| 20 30 20 67 6f 6d 6f 6b | 75 2d 6e 75 6d 62 65 72 | 0 gomok|u-number|
|00003190| 2d 6f 66 2d 6d 6f 76 65 | 73 20 67 6f 6d 6f 6b 75 |-of-move|s gomoku|
|000031a0| 2d 64 72 61 77 2d 6c 69 | 6d 69 74 20 67 6f 6d 6f |-draw-li|mit gomo|
|000031b0| 6b 75 2d 68 75 6d 61 6e | 2d 72 65 66 75 73 65 64 |ku-human|-refused|
|000031c0| 2d 64 72 61 77 20 67 6f | 6d 6f 6b 75 2d 6f 66 66 |-draw go|moku-off|
|000031d0| 65 72 2d 61 2d 64 72 61 | 77 20 64 72 61 77 2d 61 |er-a-dra|w draw-a|
|000031e0| 67 72 65 65 64 20 67 6f | 6d 6f 6b 75 2d 70 72 6f |greed go|moku-pro|
|000031f0| 6d 70 74 2d 66 6f 72 2d | 6d 6f 76 65 5d 20 34 20 |mpt-for-|move] 4 |
|00003200| 22 5c 0a 43 6f 6d 70 75 | 74 65 20 45 6d 61 63 73 |"\.Compu|te Emacs|
|00003210| 20 6e 65 78 74 20 6d 6f | 76 65 20 61 6e 64 20 70 | next mo|ve and p|
|00003220| 6c 61 79 20 69 74 2e 22 | 20 6e 69 6c 5d 29 0a 28 |lay it."| nil]).(|
|00003230| 64 65 66 61 6c 69 61 73 | 20 27 67 6f 6d 6f 6b 75 |defalias| 'gomoku|
|00003240| 2d 68 75 6d 61 6e 2d 70 | 6c 61 79 73 20 23 5b 6e |-human-p|lays #[n|
|00003250| 69 6c 20 22 c0 20 88 09 | 83 5c 6e 00 c2 20 87 0b |il ". ..|.\n.. ..|
|00003260| 84 11 00 c4 20 87 c5 89 | 1e 06 1e 07 c8 20 89 16 |.... ...|..... ..|
|00003270| 07 84 25 00 c9 ca 21 82 | 5d 00 0e 0b 0e 07 48 cc |..%...!.|].....H.|
|00003280| 55 84 35 00 c9 cd 21 82 | 5d 00 0e 0e 0e 07 48 16 |U.5...!.|].....H.|
|00003290| 06 cf 0e 07 d0 5c 22 88 | 0e 06 0e 11 59 83 5b 00 |.....\".|....Y.[.|
|000032a0| d2 0e 07 d0 5c 22 83 5b | 00 d3 20 88 d4 d5 21 82 |....\".[|.. ...!.|
|000032b0| 5d 00 d6 20 2a 87 22 20 | 5b 67 6f 6d 6f 6b 75 2d |].. *." |[gomoku-|
|000032c0| 73 77 69 74 63 68 2d 74 | 6f 2d 77 69 6e 64 6f 77 |switch-t|o-window|
|000032d0| 20 67 6f 6d 6f 6b 75 2d | 65 6d 61 63 73 2d 69 73 | gomoku-|emacs-is|
|000032e0| 2d 63 6f 6d 70 75 74 69 | 6e 67 20 67 6f 6d 6f 6b |-computi|ng gomok|
|000032f0| 75 2d 63 72 61 73 68 2d | 67 61 6d 65 20 67 6f 6d |u-crash-|game gom|
|00003300| 6f 6b 75 2d 67 61 6d 65 | 2d 69 6e 2d 70 72 6f 67 |oku-game|-in-prog|
|00003310| 72 65 73 73 20 67 6f 6d | 6f 6b 75 2d 70 72 6f 6d |ress gom|oku-prom|
|00003320| 70 74 2d 66 6f 72 2d 6f | 74 68 65 72 2d 67 61 6d |pt-for-o|ther-gam|
|00003330| 65 20 6e 69 6c 20 73 63 | 6f 72 65 20 73 71 75 61 |e nil sc|ore squa|
|00003340| 72 65 20 67 6f 6d 6f 6b | 75 2d 70 6f 69 6e 74 2d |re gomok|u-point-|
|00003350| 73 71 75 61 72 65 20 65 | 72 72 6f 72 20 22 59 6f |square e|rror "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 73 71 75 | 61 72 65 2e 20 52 65 74 |on a squ|are. Ret|
|00003380| 72 79 20 21 22 20 67 6f | 6d 6f 6b 75 2d 62 6f 61 |ry !" go|moku-boa|
|00003390| 72 64 20 30 20 22 59 6f | 75 72 20 70 6f 69 6e 74 |rd 0 "Yo|ur point|
|000033a0| 20 69 73 20 6e 6f 74 20 | 6f 6e 20 61 20 66 72 65 | is not |on a fre|
|000033b0| 65 20 73 71 75 61 72 65 | 2e 20 52 65 74 72 79 20 |e square|. Retry |
|000033c0| 21 22 20 67 6f 6d 6f 6b | 75 2d 73 63 6f 72 65 2d |!" gomok|u-score-|
|000033d0| 74 61 62 6c 65 20 67 6f | 6d 6f 6b 75 2d 70 6c 61 |table go|moku-pla|
|000033e0| 79 2d 6d 6f 76 65 20 31 | 20 67 6f 6d 6f 6b 75 2d |y-move 1| gomoku-|
|000033f0| 6c 6f 6f 73 69 6e 67 2d | 74 68 72 65 73 68 6f 6c |loosing-|threshol|
|00003400| 64 20 67 6f 6d 6f 6b 75 | 2d 66 69 6e 64 2d 66 69 |d gomoku|-find-fi|
|00003410| 6c 6c 65 64 2d 71 74 75 | 70 6c 65 20 67 6f 6d 6f |lled-qtu|ple gomo|
|00003420| 6b 75 2d 63 72 6f 73 73 | 2d 77 69 6e 6e 69 6e 67 |ku-cross|-winning|
|00003430| 2d 71 74 75 70 6c 65 20 | 67 6f 6d 6f 6b 75 2d 74 |-qtuple |gomoku-t|
|00003440| 65 72 6d 69 6e 61 74 65 | 2d 67 61 6d 65 20 68 75 |erminate|-game hu|
|00003450| 6d 61 6e 2d 77 6f 6e 20 | 67 6f 6d 6f 6b 75 2d 65 |man-won |gomoku-e|
|00003460| 6d 61 63 73 2d 70 6c 61 | 79 73 5d 20 34 20 22 5c |macs-pla|ys] 4 "\|
|00003470| 0a 53 69 67 6e 61 6c 20 | 74 6f 20 74 68 65 20 47 |.Signal |to the G|
|00003480| 6f 6d 6f 6b 75 20 70 72 | 6f 67 72 61 6d 20 74 68 |omoku pr|ogram th|
|00003490| 61 74 20 79 6f 75 20 68 | 61 76 65 20 70 6c 61 79 |at you h|ave play|
|000034a0| 65 64 2e 0a 59 6f 75 20 | 6d 75 73 74 20 68 61 76 |ed..You |must hav|
|000034b0| 65 20 70 75 74 20 74 68 | 65 20 63 75 72 73 6f 72 |e put th|e cursor|
|000034c0| 20 6f 6e 20 74 68 65 20 | 73 71 75 61 72 65 20 77 | on the |square w|
|000034d0| 68 65 72 65 20 79 6f 75 | 20 77 61 6e 74 20 74 6f |here you| want to|
|000034e0| 20 70 6c 61 79 2e 0a 49 | 66 20 74 68 65 20 67 61 | play..I|f the ga|
|000034f0| 6d 65 20 69 73 20 66 69 | 6e 69 73 68 65 64 2c 20 |me is fi|nished, |
|00003500| 74 68 69 73 20 63 6f 6d | 6d 61 6e 64 20 72 65 71 |this com|mand req|
|00003510| 75 65 73 74 73 20 66 6f | 72 20 61 6e 6f 74 68 65 |uests fo|r anothe|
|00003520| 72 20 67 61 6d 65 2e 22 | 20 6e 69 6c 5d 29 0a 28 |r game."| nil]).(|
|00003530| 64 65 66 61 6c 69 61 73 | 20 27 67 6f 6d 6f 6b 75 |defalias| 'gomoku|
|00003540| 2d 68 75 6d 61 6e 2d 74 | 61 6b 65 73 2d 62 61 63 |-human-t|akes-bac|
|00003550| 6b 20 23 5b 6e 69 6c 20 | 22 c0 20 88 09 83 5c 6e |k #[nil |". ...\n|
|00003560| 00 c2 20 87 0b 84 19 00 | c4 c5 21 88 c6 c7 21 88 |.. .....|..!...!.|
|00003570| c8 20 87 0e 09 ca 55 83 | 24 00 c4 cb 21 87 c4 cc |. ....U.|$...!...|
|00003580| 21 88 cd 16 0e 0e 09 1e | 0f 0e 0f 0e 09 55 83 3d |!.......|.....U.=|
|00003590| 00 d0 20 88 82 2f 00 29 | d1 20 87 22 20 5b 67 6f |.. ../.)|. ." [go|
|000035a0| 6d 6f 6b 75 2d 73 77 69 | 74 63 68 2d 74 6f 2d 77 |moku-swi|tch-to-w|
|000035b0| 69 6e 64 6f 77 20 67 6f | 6d 6f 6b 75 2d 65 6d 61 |indow go|moku-ema|
|000035c0| 63 73 2d 69 73 2d 63 6f | 6d 70 75 74 69 6e 67 20 |cs-is-co|mputing |
|000035d0| 67 6f 6d 6f 6b 75 2d 63 | 72 61 73 68 2d 67 61 6d |gomoku-c|rash-gam|
|000035e0| 65 20 67 6f 6d 6f 6b 75 | 2d 67 61 6d 65 2d 69 6e |e gomoku|-game-in|
|000035f0| 2d 70 72 6f 67 72 65 73 | 73 20 6d 65 73 73 61 67 |-progres|s messag|
|00003600| 65 20 22 54 6f 6f 20 6c | 61 74 65 20 66 6f 72 20 |e "Too l|ate for |
|00003610| 74 61 6b 69 6e 67 20 62 | 61 63 6b 2e 2e 2e 22 20 |taking b|ack..." |
|00003620| 73 69 74 2d 66 6f 72 20 | 34 20 67 6f 6d 6f 6b 75 |sit-for |4 gomoku|
|00003630| 2d 70 72 6f 6d 70 74 2d | 66 6f 72 2d 6f 74 68 65 |-prompt-|for-othe|
|00003640| 72 2d 67 61 6d 65 20 67 | 6f 6d 6f 6b 75 2d 6e 75 |r-game g|omoku-nu|
|00003650| 6d 62 65 72 2d 6f 66 2d | 68 75 6d 61 6e 2d 6d 6f |mber-of-|human-mo|
|00003660| 76 65 73 20 30 20 22 59 | 6f 75 20 68 61 76 65 20 |ves 0 "Y|ou have |
|00003670| 6e 6f 74 20 70 6c 61 79 | 65 64 20 79 65 74 2e 2e |not play|ed yet..|
|00003680| 2e 20 59 6f 75 72 20 6d | 6f 76 65 20 3f 22 20 22 |. Your m|ove ?" "|
|00003690| 4f 6e 65 20 6d 6f 6d 65 | 6e 74 2c 20 70 6c 65 61 |One mome|nt, plea|
|000036a0| 73 65 2e 2e 2e 22 20 74 | 20 67 6f 6d 6f 6b 75 2d |se..." t| gomoku-|
|000036b0| 68 75 6d 61 6e 2d 74 6f | 6f 6b 2d 62 61 63 6b 20 |human-to|ok-back |
|000036c0| 6e 75 6d 62 65 72 20 67 | 6f 6d 6f 6b 75 2d 74 61 |number g|omoku-ta|
|000036d0| 6b 65 2d 62 61 63 6b 20 | 67 6f 6d 6f 6b 75 2d 70 |ke-back |gomoku-p|
|000036e0| 72 6f 6d 70 74 2d 66 6f | 72 2d 6d 6f 76 65 5d 20 |rompt-fo|r-move] |
|000036f0| 32 20 22 5c 0a 53 69 67 | 6e 61 6c 20 74 6f 20 74 |2 "\.Sig|nal to t|
|00003700| 68 65 20 47 6f 6d 6f 6b | 75 20 70 72 6f 67 72 61 |he Gomok|u progra|
|00003710| 6d 20 74 68 61 74 20 79 | 6f 75 20 77 69 73 68 20 |m that y|ou wish |
|00003720| 74 6f 20 74 61 6b 65 20 | 62 61 63 6b 20 79 6f 75 |to take |back you|
|00003730| 72 20 6c 61 73 74 20 6d | 6f 76 65 2e 22 20 6e 69 |r last m|ove." ni|
|00003740| 6c 5d 29 0a 28 64 65 66 | 61 6c 69 61 73 20 27 67 |l]).(def|alias 'g|
|00003750| 6f 6d 6f 6b 75 2d 68 75 | 6d 61 6e 2d 72 65 73 69 |omoku-hu|man-resi|
|00003760| 67 6e 73 20 23 5b 6e 69 | 6c 20 22 c0 20 88 09 83 |gns #[ni|l ". ...|
|00003770| 5c 6e 00 c2 20 87 0b 84 | 12 00 c4 c5 21 87 c6 c7 |\n.. ...|....!...|
|00003780| 21 83 1c 00 c8 c9 21 87 | c6 ca 21 83 25 00 cb 20 |!.....!.|..!.%.. |
|00003790| 87 c8 c9 21 87 22 20 5b | 67 6f 6d 6f 6b 75 2d 73 |...!." [|gomoku-s|
|000037a0| 77 69 74 63 68 2d 74 6f | 2d 77 69 6e 64 6f 77 20 |witch-to|-window |
|000037b0| 67 6f 6d 6f 6b 75 2d 65 | 6d 61 63 73 2d 69 73 2d |gomoku-e|macs-is-|
|000037c0| 63 6f 6d 70 75 74 69 6e | 67 20 67 6f 6d 6f 6b 75 |computin|g gomoku|
|000037d0| 2d 63 72 61 73 68 2d 67 | 61 6d 65 20 67 6f 6d 6f |-crash-g|ame gomo|
|000037e0| 6b 75 2d 67 61 6d 65 2d | 69 6e 2d 70 72 6f 67 72 |ku-game-|in-progr|
|000037f0| 65 73 73 20 6d 65 73 73 | 61 67 65 20 22 54 68 65 |ess mess|age "The|
|00003800| 72 65 20 69 73 20 6e 6f | 20 67 61 6d 65 20 69 6e |re is no| game in|
|00003810| 20 70 72 6f 67 72 65 73 | 73 22 20 79 2d 6f 72 2d | progres|s" y-or-|
|00003820| 6e 2d 70 20 22 59 6f 75 | 20 6d 65 61 6e 2c 20 79 |n-p "You| mean, y|
|00003830| 6f 75 20 72 65 73 69 67 | 6e 20 22 20 67 6f 6d 6f |ou resig|n " gomo|
|00003840| 6b 75 2d 74 65 72 6d 69 | 6e 61 74 65 2d 67 61 6d |ku-termi|nate-gam|
|00003850| 65 20 68 75 6d 61 6e 2d | 72 65 73 69 67 6e 65 64 |e human-|resigned|
|00003860| 20 22 59 6f 75 20 6d 65 | 61 6e 2c 20 77 65 20 63 | "You me|an, we c|
|00003870| 6f 6e 74 69 6e 75 65 20 | 22 20 67 6f 6d 6f 6b 75 |ontinue |" gomoku|
|00003880| 2d 70 72 6f 6d 70 74 2d | 66 6f 72 2d 6d 6f 76 65 |-prompt-|for-move|
|00003890| 5d 20 32 20 22 5c 0a 53 | 69 67 6e 61 6c 20 74 6f |] 2 "\.S|ignal to|
|000038a0| 20 74 68 65 20 47 6f 6d | 6f 6b 75 20 70 72 6f 67 | the Gom|oku prog|
|000038b0| 72 61 6d 20 74 68 61 74 | 20 79 6f 75 20 6d 61 79 |ram that| you may|
|000038c0| 20 77 61 6e 74 20 74 6f | 20 72 65 73 69 67 6e 2e | want to| resign.|
|000038d0| 22 20 6e 69 6c 5d 29 0a | 28 64 65 66 61 6c 69 61 |" nil]).|(defalia|
|000038e0| 73 20 27 67 6f 6d 6f 6b | 75 2d 70 72 6f 6d 70 74 |s 'gomok|u-prompt|
|000038f0| 2d 66 6f 72 2d 6d 6f 76 | 65 20 23 5b 6e 69 6c 20 |-for-mov|e #[nil |
|00003900| 22 c0 09 c2 55 83 0b 00 | c3 82 0c 00 c4 21 88 8a |"...U...|.....!..|
|00003910| c5 20 71 29 87 22 20 5b | 6d 65 73 73 61 67 65 20 |. q)." [|message |
|00003920| 67 6f 6d 6f 6b 75 2d 6e | 75 6d 62 65 72 2d 6f 66 |gomoku-n|umber-of|
|00003930| 2d 68 75 6d 61 6e 2d 6d | 6f 76 65 73 20 30 20 22 |-human-m|oves 0 "|
|00003940| 59 6f 75 72 20 6d 6f 76 | 65 20 3f 20 28 6d 6f 76 |Your mov|e ? (mov|
|00003950| 65 20 74 6f 20 61 20 66 | 72 65 65 20 73 71 75 61 |e to a f|ree squa|
|00003960| 72 65 20 61 6e 64 20 68 | 69 74 20 58 2c 20 52 45 |re and h|it X, RE|
|00003970| 54 20 2e 2e 2e 29 22 20 | 22 59 6f 75 72 20 6d 6f |T ...)" |"Your mo|
|00003980| 76 65 20 3f 22 20 6f 74 | 68 65 72 2d 62 75 66 66 |ve ?" ot|her-buff|
|00003990| 65 72 5d 20 33 20 22 5c | 0a 44 69 73 70 6c 61 79 |er] 3 "\|.Display|
|000039a0| 20 61 20 6d 65 73 73 61 | 67 65 20 61 73 6b 69 6e | a messa|ge askin|
|000039b0| 67 20 66 6f 72 20 48 75 | 6d 61 6e 27 73 20 6d 6f |g for Hu|man's mo|
|000039c0| 76 65 2e 22 5d 29 0a 28 | 64 65 66 61 6c 69 61 73 |ve."]).(|defalias|
|000039d0| 20 27 67 6f 6d 6f 6b 75 | 2d 70 72 6f 6d 70 74 2d | 'gomoku|-prompt-|
|000039e0| 66 6f 72 2d 6f 74 68 65 | 72 2d 67 61 6d 65 20 23 |for-othe|r-game #|
|000039f0| 5b 6e 69 6c 20 22 c0 c1 | 21 83 0b 00 c2 0b 0c 5c |[nil "..|!......\|
|00003a00| 22 87 c5 c6 21 87 22 20 | 5b 79 2d 6f 72 2d 6e 2d |"...!." |[y-or-n-|
|00003a10| 70 20 22 41 6e 6f 74 68 | 65 72 20 67 61 6d 65 20 |p "Anoth|er game |
|00003a20| 22 20 67 6f 6d 6f 6b 75 | 20 67 6f 6d 6f 6b 75 2d |" gomoku| gomoku-|
|00003a30| 62 6f 61 72 64 2d 77 69 | 64 74 68 20 67 6f 6d 6f |board-wi|dth gomo|
|00003a40| 6b 75 2d 62 6f 61 72 64 | 2d 68 65 69 67 68 74 20 |ku-board|-height |
|00003a50| 6d 65 73 73 61 67 65 20 | 22 43 68 69 63 6b 65 6e |message |"Chicken|
|00003a60| 20 21 22 5d 20 33 20 22 | 5c 0a 41 73 6b 20 66 6f | !"] 3 "|\.Ask fo|
|00003a70| 72 20 61 6e 6f 74 68 65 | 72 20 67 61 6d 65 2c 20 |r anothe|r game, |
|00003a80| 61 6e 64 20 73 74 61 72 | 74 20 69 74 2e 22 5d 29 |and star|t it."])|
|00003a90| 0a 28 64 65 66 61 6c 69 | 61 73 20 27 67 6f 6d 6f |.(defali|as 'gomo|
|00003aa0| 6b 75 2d 6f 66 66 65 72 | 2d 61 2d 64 72 61 77 20 |ku-offer|-a-draw |
|00003ab0| 23 5b 6e 69 6c 20 22 c0 | c1 21 86 09 00 c2 89 13 |#[nil ".|.!......|
|00003ac0| 87 22 20 5b 79 2d 6f 72 | 2d 6e 2d 70 20 22 49 20 |." [y-or|-n-p "I |
|00003ad0| 6f 66 66 65 72 20 79 6f | 75 20 61 20 64 72 61 77 |offer yo|u a draw|
|00003ae0| 2e 20 44 6f 20 79 6f 75 | 20 61 63 63 65 70 74 20 |. Do you| accept |
|00003af0| 69 74 20 22 20 74 20 67 | 6f 6d 6f 6b 75 2d 68 75 |it " t g|omoku-hu|
|00003b00| 6d 61 6e 2d 72 65 66 75 | 73 65 64 2d 64 72 61 77 |man-refu|sed-draw|
|00003b10| 5d 20 32 20 22 5c 0a 4f | 66 66 65 72 20 61 20 64 |] 2 "\.O|ffer a d|
|00003b20| 72 61 77 20 61 6e 64 20 | 72 65 74 75 72 6e 20 54 |raw and |return T|
|00003b30| 20 69 66 20 48 75 6d 61 | 6e 20 61 63 63 65 70 74 | if Huma|n accept|
|00003b40| 65 64 20 69 74 2e 22 5d | 29 0a 28 64 65 66 63 6f |ed it."]|).(defco|
|00003b50| 6e 73 74 20 67 6f 6d 6f | 6b 75 2d 73 71 75 61 72 |nst gomo|ku-squar|
|00003b60| 65 2d 77 69 64 74 68 20 | 34 20 22 5c 0a 2a 48 6f |e-width |4 "\.*Ho|
|00003b70| 72 69 7a 6f 6e 74 61 6c | 20 73 70 61 63 69 6e 67 |rizontal| spacing|
|00003b80| 20 62 65 74 77 65 65 6e | 20 73 71 75 61 72 65 73 | between| squares|
|00003b90| 20 6f 6e 20 74 68 65 20 | 47 6f 6d 6f 6b 75 20 62 | on the |Gomoku b|
|00003ba0| 6f 61 72 64 2e 22 29 0a | 28 64 65 66 63 6f 6e 73 |oard.").|(defcons|
|00003bb0| 74 20 67 6f 6d 6f 6b 75 | 2d 73 71 75 61 72 65 2d |t gomoku|-square-|
|00003bc0| 68 65 69 67 68 74 20 32 | 20 22 5c 0a 2a 56 65 72 |height 2| "\.*Ver|
|00003bd0| 74 69 63 61 6c 20 73 70 | 61 63 69 6e 67 20 62 65 |tical sp|acing be|
|00003be0| 74 77 65 65 6e 20 73 71 | 75 61 72 65 73 20 6f 6e |tween sq|uares on|
|00003bf0| 20 74 68 65 20 47 6f 6d | 6f 6b 75 20 62 6f 61 72 | the Gom|oku boar|
|00003c00| 64 2e 22 29 0a 28 64 65 | 66 63 6f 6e 73 74 20 67 |d.").(de|fconst g|
|00003c10| 6f 6d 6f 6b 75 2d 78 2d | 6f 66 66 73 65 74 20 33 |omoku-x-|offset 3|
|00003c20| 20 22 5c 0a 2a 4e 75 6d | 62 65 72 20 6f 66 20 63 | "\.*Num|ber of c|
|00003c30| 6f 6c 75 6d 6e 73 20 62 | 65 74 77 65 65 6e 20 74 |olumns b|etween t|
|00003c40| 68 65 20 47 6f 6d 6f 6b | 75 20 62 6f 61 72 64 20 |he Gomok|u board |
|00003c50| 61 6e 64 20 74 68 65 20 | 73 69 64 65 20 6f 66 20 |and the |side of |
|00003c60| 74 68 65 20 77 69 6e 64 | 6f 77 2e 22 29 0a 28 64 |the wind|ow.").(d|
|00003c70| 65 66 63 6f 6e 73 74 20 | 67 6f 6d 6f 6b 75 2d 79 |efconst |gomoku-y|
|00003c80| 2d 6f 66 66 73 65 74 20 | 31 20 22 5c 0a 2a 4e 75 |-offset |1 "\.*Nu|
|00003c90| 6d 62 65 72 20 6f 66 20 | 6c 69 6e 65 73 20 62 65 |mber of |lines be|
|00003ca0| 74 77 65 65 6e 20 74 68 | 65 20 47 6f 6d 6f 6b 75 |tween th|e Gomoku|
|00003cb0| 20 62 6f 61 72 64 20 61 | 6e 64 20 74 68 65 20 74 | board a|nd the t|
|00003cc0| 6f 70 20 6f 66 20 74 68 | 65 20 77 69 6e 64 6f 77 |op of th|e window|
|00003cd0| 2e 22 29 0a 28 64 65 66 | 61 6c 69 61 73 20 27 67 |.").(def|alias 'g|
|00003ce0| 6f 6d 6f 6b 75 2d 6d 61 | 78 2d 77 69 64 74 68 20 |omoku-ma|x-width |
|00003cf0| 23 5b 6e 69 6c 20 22 c0 | c1 20 21 5c 6e 5a 5c 6e |#[nil ".|. !\nZ\n|
|00003d00| 5a c3 5a 0c a5 54 87 22 | 20 5b 77 69 6e 64 6f 77 |Z.Z..T."| [window|
|00003d10| 2d 77 69 64 74 68 20 73 | 65 6c 65 63 74 65 64 2d |-width s|elected-|
|00003d20| 77 69 6e 64 6f 77 20 67 | 6f 6d 6f 6b 75 2d 78 2d |window g|omoku-x-|
|00003d30| 6f 66 66 73 65 74 20 31 | 20 67 6f 6d 6f 6b 75 2d |offset 1| gomoku-|
|00003d40| 73 71 75 61 72 65 2d 77 | 69 64 74 68 5d 20 32 20 |square-w|idth] 2 |
|00003d50| 22 5c 0a 4c 61 72 67 65 | 73 74 20 70 6f 73 73 69 |"\.Large|st possi|
|00003d60| 62 6c 65 20 62 6f 61 72 | 64 20 77 69 64 74 68 20 |ble boar|d width |
|00003d70| 66 6f 72 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 |for the |current |
|00003d80| 77 69 6e 64 6f 77 2e 22 | 5d 29 0a 28 64 65 66 61 |window."|]).(defa|
|00003d90| 6c 69 61 73 20 27 67 6f | 6d 6f 6b 75 2d 6d 61 78 |lias 'go|moku-max|
|00003da0| 2d 68 65 69 67 68 74 20 | 23 5b 6e 69 6c 20 22 c0 |-height |#[nil ".|
|00003db0| c1 20 21 5c 6e 5a 5c 6e | 5a c3 5a 0c a5 54 87 22 |. !\nZ\n|Z.Z..T."|
|00003dc0| 20 5b 77 69 6e 64 6f 77 | 2d 68 65 69 67 68 74 20 | [window|-height |
|00003dd0| 73 65 6c 65 63 74 65 64 | 2d 77 69 6e 64 6f 77 20 |selected|-window |
|00003de0| 67 6f 6d 6f 6b 75 2d 79 | 2d 6f 66 66 73 65 74 20 |gomoku-y|-offset |
|00003df0| 32 20 67 6f 6d 6f 6b 75 | 2d 73 71 75 61 72 65 2d |2 gomoku|-square-|
|00003e00| 68 65 69 67 68 74 5d 20 | 32 20 22 5c 0a 4c 61 72 |height] |2 "\.Lar|
|00003e10| 67 65 73 74 20 70 6f 73 | 73 69 62 6c 65 20 62 6f |gest pos|sible bo|
|00003e20| 61 72 64 20 68 65 69 67 | 68 74 20 66 6f 72 20 74 |ard heig|ht for t|
|00003e30| 68 65 20 63 75 72 72 65 | 6e 74 20 77 69 6e 64 6f |he curre|nt windo|
|00003e40| 77 2e 22 5d 29 0a 28 64 | 65 66 61 6c 69 61 73 20 |w."]).(d|efalias |
|00003e50| 27 67 6f 6d 6f 6b 75 2d | 70 6f 69 6e 74 2d 78 20 |'gomoku-|point-x |
|00003e60| 23 5b 6e 69 6c 20 22 69 | 08 5a 89 19 c2 59 85 1e |#[nil "i|.Z...Y..|
|00003e70| 00 09 0b a6 c2 55 85 1e | 00 09 0b a5 54 89 11 0c |.....U..|....T...|
|00003e80| 58 85 1e 00 09 29 87 22 | 20 5b 67 6f 6d 6f 6b 75 |X....)."| [gomoku|
|00003e90| 2d 78 2d 6f 66 66 73 65 | 74 20 63 6f 6c 20 30 20 |-x-offse|t col 0 |
|00003ea0| 67 6f 6d 6f 6b 75 2d 73 | 71 75 61 72 65 2d 77 69 |gomoku-s|quare-wi|
|00003eb0| 64 74 68 20 67 6f 6d 6f | 6b 75 2d 62 6f 61 72 64 |dth gomo|ku-board|
|00003ec0| 2d 77 69 64 74 68 5d 20 | 33 20 22 5c 0a 52 65 74 |-width] |3 "\.Ret|
|00003ed0| 75 72 6e 20 74 68 65 20 | 62 6f 61 72 64 20 63 6f |urn the |board co|
|00003ee0| 6c 75 6d 6e 20 77 68 65 | 72 65 20 70 6f 69 6e 74 |lumn whe|re point|
|00003ef0| 20 69 73 2c 20 6f 72 20 | 6e 69 6c 20 69 66 20 69 | is, or |nil if i|
|00003f00| 74 20 69 73 20 6e 6f 74 | 20 61 20 62 6f 61 72 64 |t is not| a board|
|00003f10| 20 63 6f 6c 75 6d 6e 2e | 22 5d 29 0a 28 64 65 66 | column.|"]).(def|
|00003f20| 61 6c 69 61 73 20 27 67 | 6f 6d 6f 6b 75 2d 70 6f |alias 'g|omoku-po|
|00003f30| 69 6e 74 2d 79 20 23 5b | 6e 69 6c 20 22 c0 c1 60 |int-y #[|nil "..`|
|00003f40| 5c 22 5c 6e 5a c1 5a 89 | 1b c4 59 85 24 00 0b 0d |\"\nZ.Z.|..Y.$...|
|00003f50| a6 c4 55 85 24 00 0b 0d | a5 54 89 13 0e 06 58 85 |..U.$...|.T....X.|
|00003f60| 24 00 0b 29 87 22 20 5b | 63 6f 75 6e 74 2d 6c 69 |$..)." [|count-li|
|00003f70| 6e 65 73 20 31 20 67 6f | 6d 6f 6b 75 2d 79 2d 6f |nes 1 go|moku-y-o|
|00003f80| 66 66 73 65 74 20 72 6f | 77 20 30 20 67 6f 6d 6f |ffset ro|w 0 gomo|
|00003f90| 6b 75 2d 73 71 75 61 72 | 65 2d 68 65 69 67 68 74 |ku-squar|e-height|
|00003fa0| 20 67 6f 6d 6f 6b 75 2d | 62 6f 61 72 64 2d 68 65 | gomoku-|board-he|
|00003fb0| 69 67 68 74 5d 20 34 20 | 22 5c 0a 52 65 74 75 72 |ight] 4 |"\.Retur|
|00003fc0| 6e 20 74 68 65 20 62 6f | 61 72 64 20 72 6f 77 20 |n the bo|ard row |
|00003fd0| 77 68 65 72 65 20 70 6f | 69 6e 74 20 69 73 2c 20 |where po|int is, |
|00003fe0| 6f 72 20 6e 69 6c 20 69 | 66 20 69 74 20 69 73 20 |or nil i|f it is |
|00003ff0| 6e 6f 74 20 61 20 62 6f | 61 72 64 20 72 6f 77 2e |not a bo|ard row.|
|00004000| 22 5d 29 0a 28 64 65 66 | 61 6c 69 61 73 20 27 67 |"]).(def|alias 'g|
|00004010| 6f 6d 6f 6b 75 2d 70 6f | 69 6e 74 2d 73 71 75 61 |omoku-po|int-squa|
|00004020| 72 65 20 23 5b 6e 69 6c | 20 22 c0 89 19 1a c3 20 |re #[nil| "..... |
|00004030| 89 12 85 16 00 c4 20 89 | 11 85 16 00 c5 5c 6e 09 |...... .|.....\n.|
|00004040| 5c 22 2a 87 22 20 5b 6e | 69 6c 20 79 20 78 20 67 |\"*." [n|il y x g|
|00004050| 6f 6d 6f 6b 75 2d 70 6f | 69 6e 74 2d 78 20 67 6f |omoku-po|int-x go|
|00004060| 6d 6f 6b 75 2d 70 6f 69 | 6e 74 2d 79 20 67 6f 6d |moku-poi|nt-y gom|
|00004070| 6f 6b 75 2d 78 79 2d 74 | 6f 2d 69 6e 64 65 78 5d |oku-xy-t|o-index]|
|00004080| 20 33 20 22 5c 0a 52 65 | 74 75 72 6e 20 74 68 65 | 3 "\.Re|turn the|
|00004090| 20 69 6e 64 65 78 20 6f | 66 20 74 68 65 20 73 71 | index o|f the sq|
|000040a0| 75 61 72 65 20 70 6f 69 | 6e 74 20 69 73 20 6f 6e |uare poi|nt is on|
|000040b0| 2c 20 6f 72 20 6e 69 6c | 20 69 66 20 6e 6f 74 20 |, or nil| if not |
|000040c0| 6f 6e 20 74 68 65 20 62 | 6f 61 72 64 2e 22 5d 29 |on the b|oard."])|
|000040d0| 0a 28 64 65 66 61 6c 69 | 61 73 20 27 67 6f 6d 6f |.(defali|as 'gomo|
|000040e0| 6b 75 2d 67 6f 74 6f 2d | 73 71 75 61 72 65 20 23 |ku-goto-|square #|
|000040f0| 5b 28 69 6e 64 65 78 29 | 20 22 c0 c1 5c 6e 21 c3 |[(index)| "..\n!.|
|00004100| 5c 6e 21 5c 22 87 22 20 | 5b 67 6f 6d 6f 6b 75 2d |\n!\"." |[gomoku-|
|00004110| 67 6f 74 6f 2d 78 79 20 | 67 6f 6d 6f 6b 75 2d 69 |goto-xy |gomoku-i|
|00004120| 6e 64 65 78 2d 74 6f 2d | 78 20 69 6e 64 65 78 20 |ndex-to-|x index |
|00004130| 67 6f 6d 6f 6b 75 2d 69 | 6e 64 65 78 2d 74 6f 2d |gomoku-i|ndex-to-|
|00004140| 79 5d 20 34 20 22 5c 0a | 4d 6f 76 65 20 70 6f 69 |y] 4 "\.|Move poi|
|00004150| 6e 74 20 74 6f 20 73 71 | 75 61 72 65 20 6e 75 6d |nt to sq|uare num|
|00004160| 62 65 72 20 49 4e 44 45 | 58 2e 22 5d 29 0a 28 64 |ber INDE|X."]).(d|
|00004170| 65 66 61 6c 69 61 73 20 | 27 67 6f 6d 6f 6b 75 2d |efalias |'gomoku-|
|00004180| 67 6f 74 6f 2d 78 79 20 | 23 5b 28 78 20 79 29 20 |goto-xy |#[(x y) |
|00004190| 22 c0 09 5c 6e 0b 53 5f | c4 5c 5c 5c 5c 21 88 c5 |"..\n.S_|.\\\\!..|
|000041a0| 0e 06 0e 07 0e 08 53 5f | 5c 5c 21 87 22 20 5b 67 |......S_|\\!." [g|
|000041b0| 6f 74 6f 2d 6c 69 6e 65 | 20 67 6f 6d 6f 6b 75 2d |oto-line| gomoku-|
|000041c0| 79 2d 6f 66 66 73 65 74 | 20 67 6f 6d 6f 6b 75 2d |y-offset| gomoku-|
|000041d0| 73 71 75 61 72 65 2d 68 | 65 69 67 68 74 20 79 20 |square-h|eight y |
|000041e0| 31 20 6d 6f 76 65 2d 74 | 6f 2d 63 6f 6c 75 6d 6e |1 move-t|o-column|
|000041f0| 20 67 6f 6d 6f 6b 75 2d | 78 2d 6f 66 66 73 65 74 | gomoku-|x-offset|
|00004200| 20 67 6f 6d 6f 6b 75 2d | 73 71 75 61 72 65 2d 77 | gomoku-|square-w|
|00004210| 69 64 74 68 20 78 5d 20 | 34 20 22 5c 0a 4d 6f 76 |idth x] |4 "\.Mov|
|00004220| 65 20 70 6f 69 6e 74 20 | 74 6f 20 73 71 75 61 72 |e point |to squar|
|00004230| 65 20 61 74 20 58 2c 20 | 59 20 63 6f 6f 72 64 73 |e at X, |Y coords|
|00004240| 2e 22 5d 29 0a 28 64 65 | 66 61 6c 69 61 73 20 27 |."]).(de|falias '|
|00004250| 67 6f 6d 6f 6b 75 2d 70 | 6c 6f 74 2d 73 71 75 61 |gomoku-p|lot-squa|
|00004260| 72 65 20 23 5b 28 73 71 | 75 61 72 65 20 76 61 6c |re #[(sq|uare val|
|00004270| 75 65 29 20 22 c0 09 21 | 88 c2 0b c4 55 83 0f 00 |ue) "..!|....U...|
|00004280| c5 82 1a 00 0b c6 55 83 | 19 00 c7 82 1a 00 c8 21 |......U.|.......!|
|00004290| 88 c9 ca 21 87 22 20 5b | 67 6f 6d 6f 6b 75 2d 67 |...!." [|gomoku-g|
|000042a0| 6f 74 6f 2d 73 71 75 61 | 72 65 20 73 71 75 61 72 |oto-squa|re squar|
|000042b0| 65 20 67 6f 6d 6f 6b 75 | 2d 70 75 74 2d 63 68 61 |e gomoku|-put-cha|
|000042c0| 72 20 76 61 6c 75 65 20 | 31 20 38 38 20 36 20 37 |r value |1 88 6 7|
|000042d0| 39 20 34 36 20 73 69 74 | 2d 66 6f 72 20 30 5d 20 |9 46 sit|-for 0] |
|000042e0| 33 20 22 5c 0a 44 72 61 | 77 20 27 58 27 2c 20 27 |3 "\.Dra|w 'X', '|
|000042f0| 4f 27 20 6f 72 20 27 2e | 27 20 6f 6e 20 53 51 55 |O' or '.|' on SQU|
|00004300| 41 52 45 20 28 64 65 70 | 65 6e 64 69 6e 67 20 6f |ARE (dep|ending o|
|00004310| 6e 20 56 41 4c 55 45 29 | 2c 20 6c 65 61 76 65 20 |n VALUE)|, leave |
|00004320| 70 6f 69 6e 74 20 74 68 | 65 72 65 2e 22 5d 29 0a |point th|ere."]).|
|00004330| 28 64 65 66 61 6c 69 61 | 73 20 27 67 6f 6d 6f 6b |(defalia|s 'gomok|
|00004340| 75 2d 70 75 74 2d 63 68 | 61 72 20 23 5b 28 63 68 |u-put-ch|ar #[(ch|
|00004350| 61 72 29 20 22 08 83 07 | 00 c1 20 88 5c 6e 63 88 |ar) "...|.. .\nc.|
|00004360| c3 c4 21 88 c5 c4 21 88 | c1 20 87 22 20 5b 62 75 |..!...!.|. ." [bu|
|00004370| 66 66 65 72 2d 72 65 61 | 64 2d 6f 6e 6c 79 20 74 |ffer-rea|d-only t|
|00004380| 6f 67 67 6c 65 2d 72 65 | 61 64 2d 6f 6e 6c 79 20 |oggle-re|ad-only |
|00004390| 63 68 61 72 20 64 65 6c | 65 74 65 2d 63 68 61 72 |char del|ete-char|
|000043a0| 20 31 20 62 61 63 6b 77 | 61 72 64 2d 63 68 61 72 | 1 backw|ard-char|
|000043b0| 5d 20 32 20 22 5c 0a 44 | 72 61 77 20 43 48 41 52 |] 2 "\.D|raw CHAR|
|000043c0| 20 6f 6e 20 74 68 65 20 | 47 6f 6d 6f 6b 75 20 73 | on the |Gomoku s|
|000043d0| 63 72 65 65 6e 2e 22 5d | 29 0a 28 64 65 66 61 6c |creen."]|).(defal|
|000043e0| 69 61 73 20 27 67 6f 6d | 6f 6b 75 2d 69 6e 69 74 |ias 'gom|oku-init|
|000043f0| 2d 64 69 73 70 6c 61 79 | 20 23 5b 28 6e 20 6d 29 |-display| #[(n m)|
|00004400| 20 22 c0 70 21 88 09 83 | 0b 00 c2 20 88 c3 20 88 | ".p!...|... .. .|
|00004410| c4 89 89 89 1d 1e 06 1e | 07 1e 08 c9 0e 5c 6e 53 |........|.....\nS|
|00004420| cb 5c 22 cc 50 16 08 cd | ce cf 0e 10 53 0e 08 5c |.\".P...|....S..\|
|00004430| 22 5c 22 16 08 c9 0e 11 | cb 5c 22 cc 0e 08 d2 52 |"\".....|.\"....R|
|00004440| 16 08 c9 0e 11 0e 10 53 | 0e 5c 6e 5f d3 5c 5c 5c |.......S|.\n_.\\\|
|00004450| 5c cb 5c 22 89 16 07 d2 | 50 16 07 cd ce cf 0e 14 |\.\"....|P.......|
|00004460| 53 0e 07 5c 22 5c 22 89 | 16 06 0e 08 50 16 06 cd |S..\"\".|....P...|
|00004470| ce cf 0e 15 53 0e 06 5c | 22 5c 22 16 06 cd ce cf |....S..\|"\".....|
|00004480| 0e 16 0e 07 5c 22 5c 22 | 89 15 0e 08 0e 06 b1 03 |....\"\"|........|
|00004490| 88 2c c2 20 88 d7 0e 10 | 54 d8 a5 0e 15 54 d8 a5 |.,. ....|T....T..|
|000044a0| 5c 22 88 d9 da 21 87 22 | 20 5b 62 75 66 66 65 72 |\"...!."| [buffer|
|000044b0| 2d 64 69 73 61 62 6c 65 | 2d 75 6e 64 6f 20 62 75 |-disable|-undo bu|
|000044c0| 66 66 65 72 2d 72 65 61 | 64 2d 6f 6e 6c 79 20 74 |ffer-rea|d-only t|
|000044d0| 6f 67 67 6c 65 2d 72 65 | 61 64 2d 6f 6e 6c 79 20 |oggle-re|ad-only |
|000044e0| 65 72 61 73 65 2d 62 75 | 66 66 65 72 20 6e 69 6c |erase-bu|ffer nil|
|000044f0| 20 73 74 72 69 6e 67 34 | 20 73 74 72 69 6e 67 33 | string4| string3|
|00004500| 20 73 74 72 69 6e 67 32 | 20 73 74 72 69 6e 67 31 | string2| string1|
|00004510| 20 6d 61 6b 65 2d 73 74 | 72 69 6e 67 20 67 6f 6d | make-st|ring gom|
|00004520| 6f 6b 75 2d 73 71 75 61 | 72 65 2d 77 69 64 74 68 |oku-squa|re-width|
|00004530| 20 33 32 20 22 2e 22 20 | 61 70 70 6c 79 20 63 6f | 32 "." |apply co|
|00004540| 6e 63 61 74 20 6d 61 6b | 65 2d 6c 69 73 74 20 6e |ncat mak|e-list n|
|00004550| 20 67 6f 6d 6f 6b 75 2d | 78 2d 6f 66 66 73 65 74 | gomoku-|x-offset|
|00004560| 20 22 5c 6e 22 20 31 20 | 67 6f 6d 6f 6b 75 2d 73 | "\n" 1 |gomoku-s|
|00004570| 71 75 61 72 65 2d 68 65 | 69 67 68 74 20 6d 20 67 |quare-he|ight m g|
|00004580| 6f 6d 6f 6b 75 2d 79 2d | 6f 66 66 73 65 74 20 67 |omoku-y-|offset g|
|00004590| 6f 6d 6f 6b 75 2d 67 6f | 74 6f 2d 78 79 20 32 20 |omoku-go|to-xy 2 |
|000045a0| 73 69 74 2d 66 6f 72 20 | 30 5d 20 36 20 22 5c 0a |sit-for |0] 6 "\.|
|000045b0| 44 69 73 70 6c 61 79 20 | 61 6e 20 4e 20 62 79 20 |Display |an N by |
|000045c0| 4d 20 47 6f 6d 6f 6b 75 | 20 62 6f 61 72 64 2e 22 |M Gomoku| board."|
|000045d0| 5d 29 0a 28 64 65 66 61 | 6c 69 61 73 20 27 67 6f |]).(defa|lias 'go|
|000045e0| 6d 6f 6b 75 2d 64 69 73 | 70 6c 61 79 2d 73 74 61 |moku-dis|play-sta|
|000045f0| 74 69 73 74 69 63 73 20 | 23 5b 6e 69 6c 20 22 08 |tistics |#[nil ".|
|00004600| c1 55 84 0f 00 c2 c3 0c | 0d 08 24 82 35 00 0d c1 |.U......|..$.5...|
|00004610| 55 84 1d 00 c2 c6 0c 0d | 23 82 35 00 0c c1 55 83 |U.......|#.5...U.|
|00004620| 27 00 c7 82 35 00 0c c8 | 55 83 31 00 c9 82 35 00 |'...5...|U.1...5.|
|00004630| c2 ca 0c 5c 22 16 0b cc | cd 20 21 87 22 20 5b 67 |...\"...|. !." [g|
|00004640| 6f 6d 6f 6b 75 2d 6e 75 | 6d 62 65 72 2d 6f 66 2d |omoku-nu|mber-of-|
|00004650| 64 72 61 77 73 20 30 20 | 66 6f 72 6d 61 74 20 22 |draws 0 |format "|
|00004660| 3a 20 57 6f 6e 20 25 64 | 2c 20 6c 6f 73 74 20 25 |: Won %d|, lost %|
|00004670| 64 2c 20 64 72 65 77 20 | 25 64 22 20 67 6f 6d 6f |d, drew |%d" gomo|
|00004680| 6b 75 2d 6e 75 6d 62 65 | 72 2d 6f 66 2d 77 69 6e |ku-numbe|r-of-win|
|00004690| 73 20 67 6f 6d 6f 6b 75 | 2d 6e 75 6d 62 65 72 2d |s gomoku|-number-|
|000046a0| 6f 66 2d 6c 6f 73 73 65 | 73 20 22 3a 20 57 6f 6e |of-losse|s ": Won|
|000046b0| 20 25 64 2c 20 6c 6f 73 | 74 20 25 64 22 20 22 22 | %d, los|t %d" ""|
|000046c0| 20 31 20 22 3a 20 41 6c | 72 65 61 64 79 20 77 6f | 1 ": Al|ready wo|
|000046d0| 6e 20 6f 6e 65 22 20 22 | 3a 20 57 6f 6e 20 25 64 |n one" "|: Won %d|
|000046e0| 20 69 6e 20 61 20 72 6f | 77 22 20 6d 6f 64 65 2d | in a ro|w" mode-|
|000046f0| 6c 69 6e 65 2d 70 72 6f | 63 65 73 73 20 73 65 74 |line-pro|cess set|
|00004700| 2d 62 75 66 66 65 72 2d | 6d 6f 64 69 66 69 65 64 |-buffer-|modified|
|00004710| 2d 70 20 62 75 66 66 65 | 72 2d 6d 6f 64 69 66 69 |-p buffe|r-modifi|
|00004720| 65 64 2d 70 5d 20 35 20 | 22 5c 0a 4f 62 6e 6f 78 |ed-p] 5 |"\.Obnox|
|00004730| 69 6f 75 73 6c 79 20 64 | 69 73 70 6c 61 79 20 73 |iously d|isplay s|
|00004740| 6f 6d 65 20 73 74 61 74 | 69 73 74 69 63 73 20 61 |ome stat|istics a|
|00004750| 62 6f 75 74 20 70 72 65 | 76 69 6f 75 73 20 67 61 |bout pre|vious ga|
|00004760| 6d 65 73 20 69 6e 20 6d | 6f 64 65 20 6c 69 6e 65 |mes in m|ode line|
|00004770| 2e 22 5d 29 0a 28 64 65 | 66 61 6c 69 61 73 20 27 |."]).(de|falias '|
|00004780| 67 6f 6d 6f 6b 75 2d 73 | 77 69 74 63 68 2d 74 6f |gomoku-s|witch-to|
|00004790| 2d 77 69 6e 64 6f 77 20 | 23 5b 6e 69 6c 20 22 c0 |-window |#[nil ".|
|000047a0| c1 21 89 1a 83 0e 00 c3 | 5c 6e 21 82 1b 00 0c 83 |.!......|\n!.....|
|000047b0| 15 00 c5 20 88 c3 c1 21 | 88 c6 20 29 87 22 20 5b |... ...!|.. )." [|
|000047c0| 67 65 74 2d 62 75 66 66 | 65 72 20 22 2a 47 6f 6d |get-buff|er "*Gom|
|000047d0| 6f 6b 75 2a 22 20 62 75 | 66 66 20 73 77 69 74 63 |oku*" bu|ff switc|
|000047e0| 68 2d 74 6f 2d 62 75 66 | 66 65 72 20 67 6f 6d 6f |h-to-buf|fer gomo|
|000047f0| 6b 75 2d 67 61 6d 65 2d | 69 6e 2d 70 72 6f 67 72 |ku-game-|in-progr|
|00004800| 65 73 73 20 67 6f 6d 6f | 6b 75 2d 63 72 61 73 68 |ess gomo|ku-crash|
|00004810| 2d 67 61 6d 65 20 67 6f | 6d 6f 6b 75 2d 6d 6f 64 |-game go|moku-mod|
|00004820| 65 5d 20 33 20 22 5c 0a | 46 69 6e 64 20 6f 72 20 |e] 3 "\.|Find or |
|00004830| 63 72 65 61 74 65 20 74 | 68 65 20 47 6f 6d 6f 6b |create t|he Gomok|
|00004840| 75 20 62 75 66 66 65 72 | 2c 20 61 6e 64 20 64 69 |u buffer|, and di|
|00004850| 73 70 6c 61 79 20 69 74 | 2e 22 20 6e 69 6c 5d 29 |splay it|." nil])|
|00004860| 0a 28 64 65 66 76 61 72 | 20 67 6f 6d 6f 6b 75 2d |.(defvar| gomoku-|
|00004870| 77 69 6e 6e 69 6e 67 2d | 71 74 75 70 6c 65 2d 62 |winning-|qtuple-b|
|00004880| 65 67 20 6e 69 6c 20 22 | 5c 0a 46 69 72 73 74 20 |eg nil "|\.First |
|00004890| 73 71 75 61 72 65 20 6f | 66 20 74 68 65 20 77 69 |square o|f the wi|
|000048a0| 6e 6e 69 6e 67 20 71 74 | 75 70 6c 65 2e 22 29 0a |nning qt|uple.").|
|000048b0| 28 64 65 66 76 61 72 20 | 67 6f 6d 6f 6b 75 2d 77 |(defvar |gomoku-w|
|000048c0| 69 6e 6e 69 6e 67 2d 71 | 74 75 70 6c 65 2d 65 6e |inning-q|tuple-en|
|000048d0| 64 20 6e 69 6c 20 22 5c | 0a 4c 61 73 74 20 73 71 |d nil "\|.Last sq|
|000048e0| 75 61 72 65 20 6f 66 20 | 74 68 65 20 77 69 6e 6e |uare of |the winn|
|000048f0| 69 6e 67 20 71 74 75 70 | 6c 65 2e 22 29 0a 28 64 |ing qtup|le.").(d|
|00004900| 65 66 76 61 72 20 67 6f | 6d 6f 6b 75 2d 77 69 6e |efvar go|moku-win|
|00004910| 6e 69 6e 67 2d 71 74 75 | 70 6c 65 2d 64 78 20 6e |ning-qtu|ple-dx n|
|00004920| 69 6c 20 22 5c 0a 44 69 | 72 65 63 74 69 6f 6e 20 |il "\.Di|rection |
|00004930| 6f 66 20 74 68 65 20 77 | 69 6e 6e 69 6e 67 20 71 |of the w|inning q|
|00004940| 74 75 70 6c 65 20 28 61 | 6c 6f 6e 67 20 74 68 65 |tuple (a|long the|
|00004950| 20 58 20 61 78 69 73 29 | 2e 22 29 0a 28 64 65 66 | X axis)|.").(def|
|00004960| 76 61 72 20 67 6f 6d 6f | 6b 75 2d 77 69 6e 6e 69 |var gomo|ku-winni|
|00004970| 6e 67 2d 71 74 75 70 6c | 65 2d 64 79 20 6e 69 6c |ng-qtupl|e-dy nil|
|00004980| 20 22 5c 0a 44 69 72 65 | 63 74 69 6f 6e 20 6f 66 | "\.Dire|ction of|
|00004990| 20 74 68 65 20 77 69 6e | 6e 69 6e 67 20 71 74 75 | the win|ning qtu|
|000049a0| 70 6c 65 20 28 61 6c 6f | 6e 67 20 74 68 65 20 59 |ple (alo|ng the Y|
|000049b0| 20 61 78 69 73 29 2e 22 | 29 0a 28 64 65 66 61 6c | axis)."|).(defal|
|000049c0| 69 61 73 20 27 67 6f 6d | 6f 6b 75 2d 66 69 6e 64 |ias 'gom|oku-find|
|000049d0| 2d 66 69 6c 6c 65 64 2d | 71 74 75 70 6c 65 20 23 |-filled-|qtuple #|
|000049e0| 5b 28 73 71 75 61 72 65 | 20 76 61 6c 75 65 29 20 |[(square| value) |
|000049f0| 22 c0 09 5c 6e c3 c4 24 | 86 21 00 c0 09 5c 6e c4 |"..\n..$|.!...\n.|
|00004a00| c3 24 86 21 00 c0 09 5c | 6e c3 89 24 86 21 00 c0 |.$.!...\|n..$.!..|
|00004a10| 09 5c 6e c5 c3 24 87 22 | 20 5b 67 6f 6d 6f 6b 75 |.\n..$."| [gomoku|
|00004a20| 2d 63 68 65 63 6b 2d 66 | 69 6c 6c 65 64 2d 71 74 |-check-f|illed-qt|
|00004a30| 75 70 6c 65 20 73 71 75 | 61 72 65 20 76 61 6c 75 |uple squ|are valu|
|00004a40| 65 20 31 20 30 20 2d 31 | 5d 20 35 20 22 5c 0a 52 |e 1 0 -1|] 5 "\.R|
|00004a50| 65 74 75 72 6e 20 54 20 | 69 66 20 53 51 55 41 52 |eturn T |if SQUAR|
|00004a60| 45 20 62 65 6c 6f 6e 67 | 73 20 74 6f 20 61 20 71 |E belong|s to a q|
|00004a70| 74 75 70 6c 65 20 66 69 | 6c 6c 65 64 20 77 69 74 |tuple fi|lled wit|
|00004a80| 68 20 56 41 4c 55 45 73 | 2e 22 5d 29 0a 28 64 65 |h VALUEs|."]).(de|
|00004a90| 66 61 6c 69 61 73 20 27 | 67 6f 6d 6f 6b 75 2d 63 |falias '|gomoku-c|
|00004aa0| 68 65 63 6b 2d 66 69 6c | 6c 65 64 2d 71 74 75 70 |heck-fil|led-qtup|
|00004ab0| 6c 65 20 23 5b 28 73 71 | 75 61 72 65 20 76 61 6c |le #[(sq|uare val|
|00004ac0| 75 65 20 64 78 20 64 79 | 29 20 22 c0 89 09 89 c2 |ue dx dy|) ".....|
|00004ad0| 0b 0c 5c 22 c5 1e 06 1e | 07 1e 08 1e 09 1e 5c 6e |..\"....|......\n|
|00004ae0| 89 1e 0b cc 56 83 35 00 | 0e 0d 0e 0e 0e 09 0e 07 |....V.5.|........|
|00004af0| 5a 89 16 09 48 55 83 35 | 00 0e 0b 53 89 16 0b 82 |Z...HU.5|...S....|
|00004b00| 16 00 0e 0b cf 5c 5c 16 | 06 0e 5c 6e 0e 06 57 83 |.....\\.|..\n..W.|
|00004b10| 5d 00 0e 0d 0e 0e 0e 08 | 0e 07 5c 5c 89 16 08 48 |].......|..\\...H|
|00004b20| 55 83 5d 00 0e 5c 6e 54 | 89 16 5c 6e 82 3d 00 0e |U.]..\nT|..\n.=..|
|00004b30| 5c 6e 0e 06 55 85 7e 00 | 09 0e 0b 0e 07 5f 5c 5c |\n..U.~.|....._\\|
|00004b40| 16 10 09 0e 5c 6e 0e 07 | 5f 5c 5c 16 11 0b 16 12 |....\n..|_\\.....|
|00004b50| 0c 16 13 d4 2e 06 87 22 | 20 5b 30 20 73 71 75 61 |......."| [0 squa|
|00004b60| 72 65 20 67 6f 6d 6f 6b | 75 2d 78 79 2d 74 6f 2d |re gomok|u-xy-to-|
|00004b70| 69 6e 64 65 78 20 64 78 | 20 64 79 20 6e 69 6c 20 |index dx| dy nil |
|00004b80| 61 2b 34 20 64 65 70 6c | 20 72 69 67 68 74 20 6c |a+4 depl| right l|
|00004b90| 65 66 74 20 62 20 61 20 | 2d 34 20 76 61 6c 75 65 |eft b a |-4 value|
|00004ba0| 20 67 6f 6d 6f 6b 75 2d | 62 6f 61 72 64 20 34 20 | gomoku-|board 4 |
|00004bb0| 67 6f 6d 6f 6b 75 2d 77 | 69 6e 6e 69 6e 67 2d 71 |gomoku-w|inning-q|
|00004bc0| 74 75 70 6c 65 2d 62 65 | 67 20 67 6f 6d 6f 6b 75 |tuple-be|g gomoku|
|00004bd0| 2d 77 69 6e 6e 69 6e 67 | 2d 71 74 75 70 6c 65 2d |-winning|-qtuple-|
|00004be0| 65 6e 64 20 67 6f 6d 6f | 6b 75 2d 77 69 6e 6e 69 |end gomo|ku-winni|
|00004bf0| 6e 67 2d 71 74 75 70 6c | 65 2d 64 78 20 67 6f 6d |ng-qtupl|e-dx gom|
|00004c00| 6f 6b 75 2d 77 69 6e 6e | 69 6e 67 2d 71 74 75 70 |oku-winn|ing-qtup|
|00004c10| 6c 65 2d 64 79 20 74 5d | 20 38 20 22 5c 0a 52 65 |le-dy t]| 8 "\.Re|
|00004c20| 74 75 72 6e 20 54 20 69 | 66 20 53 51 55 41 52 45 |turn T i|f SQUARE|
|00004c30| 20 62 65 6c 6f 6e 67 73 | 20 74 6f 20 61 20 71 74 | belongs| to a qt|
|00004c40| 75 70 6c 65 20 66 69 6c | 6c 65 64 20 20 77 69 74 |uple fil|led wit|
|00004c50| 68 20 56 41 4c 55 45 73 | 20 61 6c 6f 6e 67 20 44 |h VALUEs| along D|
|00004c60| 58 2c 20 44 59 2e 22 5d | 29 0a 28 64 65 66 61 6c |X, DY."]|).(defal|
|00004c70| 69 61 73 20 27 67 6f 6d | 6f 6b 75 2d 63 72 6f 73 |ias 'gom|oku-cros|
|00004c80| 73 2d 77 69 6e 6e 69 6e | 67 2d 71 74 75 70 6c 65 |s-winnin|g-qtuple|
|00004c90| 20 23 5b 6e 69 6c 20 22 | c0 09 5c 6e 0b 0c 24 87 | #[nil "|..\n..$.|
|00004ca0| 22 20 5b 67 6f 6d 6f 6b | 75 2d 63 72 6f 73 73 2d |" [gomok|u-cross-|
|00004cb0| 71 74 75 70 6c 65 20 67 | 6f 6d 6f 6b 75 2d 77 69 |qtuple g|omoku-wi|
|00004cc0| 6e 6e 69 6e 67 2d 71 74 | 75 70 6c 65 2d 62 65 67 |nning-qt|uple-beg|
|00004cd0| 20 67 6f 6d 6f 6b 75 2d | 77 69 6e 6e 69 6e 67 2d | gomoku-|winning-|
|00004ce0| 71 74 75 70 6c 65 2d 65 | 6e 64 20 67 6f 6d 6f 6b |qtuple-e|nd gomok|
|00004cf0| 75 2d 77 69 6e 6e 69 6e | 67 2d 71 74 75 70 6c 65 |u-winnin|g-qtuple|
|00004d00| 2d 64 78 20 67 6f 6d 6f | 6b 75 2d 77 69 6e 6e 69 |-dx gomo|ku-winni|
|00004d10| 6e 67 2d 71 74 75 70 6c | 65 2d 64 79 5d 20 35 20 |ng-qtupl|e-dy] 5 |
|00004d20| 22 5c 0a 43 72 6f 73 73 | 20 77 69 6e 6e 69 6e 67 |"\.Cross| winning|
|00004d30| 20 71 74 75 70 6c 65 2c | 20 61 73 20 66 6f 75 6e | qtuple,| as foun|
|00004d40| 64 20 62 79 20 60 67 6f | 6d 6f 6b 75 2d 66 69 6e |d by `go|moku-fin|
|00004d50| 64 2d 66 69 6c 6c 65 64 | 2d 71 74 75 70 6c 65 27 |d-filled|-qtuple'|
|00004d60| 2e 22 5d 29 0a 28 64 65 | 66 61 6c 69 61 73 20 27 |."]).(de|falias '|
|00004d70| 67 6f 6d 6f 6b 75 2d 63 | 72 6f 73 73 2d 71 74 75 |gomoku-c|ross-qtu|
|00004d80| 70 6c 65 20 23 5b 28 73 | 71 75 61 72 65 31 20 73 |ple #[(s|quare1 s|
|00004d90| 71 75 61 72 65 32 20 64 | 78 20 64 79 29 20 22 8a |quare2 d|x dy) ".|
|00004da0| c0 09 5c 6e 5c 22 1b 0c | 0d 55 84 aa 00 c6 0c 21 |..\n\"..|.U.....!|
|00004db0| 88 0c 0b 5c 5c 14 09 c7 | 55 83 3e 00 5c 6e c8 55 |...\\...|U.>.\n.U|
|00004dc0| 83 3e 00 c7 1e 09 0e 09 | 0e 5c 6e 57 83 3a 00 0e |.>......|.\nW.:..|
|00004dd0| 09 54 16 09 c7 75 88 cb | cc 21 88 82 23 00 29 82 |.T...u..|.!..#.).|
|00004de0| 06 00 09 c8 55 83 69 00 | 5c 6e c7 55 83 69 00 c7 |....U.i.|\n.U.i..|
|00004df0| 1e 09 0e 09 0e 0d 57 83 | 65 00 0e 09 54 16 09 ce |......W.|e...T...|
|00004e00| c7 21 88 cb cf 21 88 82 | 4d 00 29 82 06 00 09 d0 |.!...!..|M.).....|
|00004e10| 55 83 8a 00 5c 6e c7 55 | 83 8a 00 d1 0e 5c 6e d2 |U...\n.U|.....\n.|
|00004e20| a5 21 88 ce 0e 0d d2 a5 | 21 88 cb d3 21 88 82 06 |.!......|!...!...|
|00004e30| 00 09 c7 55 83 06 00 5c | 6e c7 55 83 06 00 0e 5c |...U...\|n.U....\|
|00004e40| 6e d2 a5 75 88 ce 0e 0d | d2 a5 21 88 cb d4 21 88 |n..u....|..!...!.|
|00004e50| 82 06 00 2a d5 c8 21 87 | 22 20 5b 67 6f 6d 6f 6b |...*..!.|" [gomok|
|00004e60| 75 2d 78 79 2d 74 6f 2d | 69 6e 64 65 78 20 64 78 |u-xy-to-|index dx|
|00004e70| 20 64 79 20 64 65 70 6c | 20 73 71 75 61 72 65 31 | dy depl| square1|
|00004e80| 20 73 71 75 61 72 65 32 | 20 67 6f 6d 6f 6b 75 2d | square2| gomoku-|
|00004e90| 67 6f 74 6f 2d 73 71 75 | 61 72 65 20 31 20 30 20 |goto-squ|are 1 0 |
|00004ea0| 6e 20 67 6f 6d 6f 6b 75 | 2d 73 71 75 61 72 65 2d |n gomoku|-square-|
|00004eb0| 77 69 64 74 68 20 67 6f | 6d 6f 6b 75 2d 70 75 74 |width go|moku-put|
|00004ec0| 2d 63 68 61 72 20 34 35 | 20 67 6f 6d 6f 6b 75 2d |-char 45| gomoku-|
|00004ed0| 73 71 75 61 72 65 2d 68 | 65 69 67 68 74 20 6e 65 |square-h|eight ne|
|00004ee0| 78 74 2d 6c 69 6e 65 20 | 31 32 34 20 2d 31 20 62 |xt-line |124 -1 b|
|00004ef0| 61 63 6b 77 61 72 64 2d | 63 68 61 72 20 32 20 34 |ackward-|char 2 4|
|00004f00| 37 20 39 32 20 73 69 74 | 2d 66 6f 72 5d 20 33 20 |7 92 sit|-for] 3 |
|00004f10| 22 5c 0a 43 72 6f 73 73 | 20 65 76 65 72 79 20 73 |"\.Cross| every s|
|00004f20| 71 75 61 72 65 20 62 65 | 74 77 65 65 6e 20 53 51 |quare be|tween SQ|
|00004f30| 55 41 52 45 31 20 61 6e | 64 20 53 51 55 41 52 45 |UARE1 an|d SQUARE|
|00004f40| 32 20 69 6e 20 74 68 65 | 20 44 58 2c 20 44 59 20 |2 in the| DX, DY |
|00004f50| 64 69 72 65 63 74 69 6f | 6e 2e 22 5d 29 0a 28 64 |directio|n."]).(d|
|00004f60| 65 66 61 6c 69 61 73 20 | 27 67 6f 6d 6f 6b 75 2d |efalias |'gomoku-|
|00004f70| 6d 6f 76 65 2d 6c 65 66 | 74 20 23 5b 6e 69 6c 20 |move-lef|t #[nil |
|00004f80| 22 c0 20 19 c2 09 84 0c | 00 c3 82 17 00 09 c3 56 |". .....|.......V|
|00004f90| 83 16 00 0c 82 17 00 c5 | 21 29 87 22 20 5b 67 6f |........|!)." [go|
|00004fa0| 6d 6f 6b 75 2d 70 6f 69 | 6e 74 2d 78 20 78 20 62 |moku-poi|nt-x x b|
|00004fb0| 61 63 6b 77 61 72 64 2d | 63 68 61 72 20 31 20 67 |ackward-|char 1 g|
|00004fc0| 6f 6d 6f 6b 75 2d 73 71 | 75 61 72 65 2d 77 69 64 |omoku-sq|uare-wid|
|00004fd0| 74 68 20 30 5d 20 33 20 | 22 5c 0a 4d 6f 76 65 20 |th 0] 3 |"\.Move |
|00004fe0| 70 6f 69 6e 74 20 62 61 | 63 6b 77 61 72 64 20 6f |point ba|ckward o|
|00004ff0| 6e 65 20 63 6f 6c 75 6d | 6e 20 6f 6e 20 74 68 65 |ne colum|n on the|
|00005000| 20 47 6f 6d 6f 6b 75 20 | 62 6f 61 72 64 2e 22 20 | Gomoku |board." |
|00005010| 6e 69 6c 5d 29 0a 28 64 | 65 66 61 6c 69 61 73 20 |nil]).(d|efalias |
|00005020| 27 67 6f 6d 6f 6b 75 2d | 6d 6f 76 65 2d 72 69 67 |'gomoku-|move-rig|
|00005030| 68 74 20 23 5b 6e 69 6c | 20 22 c0 20 89 19 84 0b |ht #[nil| ". ....|
|00005040| 00 c2 82 16 00 09 0b 57 | 83 15 00 0c 82 16 00 c5 |.......W|........|
|00005050| 75 29 87 22 20 5b 67 6f | 6d 6f 6b 75 2d 70 6f 69 |u)." [go|moku-poi|
|00005060| 6e 74 2d 78 20 78 20 31 | 20 67 6f 6d 6f 6b 75 2d |nt-x x 1| gomoku-|
|00005070| 62 6f 61 72 64 2d 77 69 | 64 74 68 20 67 6f 6d 6f |board-wi|dth gomo|
|00005080| 6b 75 2d 73 71 75 61 72 | 65 2d 77 69 64 74 68 20 |ku-squar|e-width |
|00005090| 30 5d 20 33 20 22 5c 0a | 4d 6f 76 65 20 70 6f 69 |0] 3 "\.|Move poi|
|000050a0| 6e 74 20 66 6f 72 77 61 | 72 64 20 6f 6e 65 20 63 |nt forwa|rd one c|
|000050b0| 6f 6c 75 6d 6e 20 6f 6e | 20 74 68 65 20 47 6f 6d |olumn on| the Gom|
|000050c0| 6f 6b 75 20 62 6f 61 72 | 64 2e 22 20 6e 69 6c 5d |oku boar|d." nil]|
|000050d0| 29 0a 28 64 65 66 61 6c | 69 61 73 20 27 67 6f 6d |).(defal|ias 'gom|
|000050e0| 6f 6b 75 2d 6d 6f 76 65 | 2d 64 6f 77 6e 20 23 5b |oku-move|-down #[|
|000050f0| 6e 69 6c 20 22 c0 20 19 | c2 09 84 0c 00 c3 82 17 |nil ". .|........|
|00005100| 00 09 0c 57 83 16 00 0d | 82 17 00 c6 21 29 87 22 |...W....|....!)."|
|00005110| 20 5b 67 6f 6d 6f 6b 75 | 2d 70 6f 69 6e 74 2d 79 | [gomoku|-point-y|
|00005120| 20 79 20 6e 65 78 74 2d | 6c 69 6e 65 20 31 20 67 | y next-|line 1 g|
|00005130| 6f 6d 6f 6b 75 2d 62 6f | 61 72 64 2d 68 65 69 67 |omoku-bo|ard-heig|
|00005140| 68 74 20 67 6f 6d 6f 6b | 75 2d 73 71 75 61 72 65 |ht gomok|u-square|
|00005150| 2d 68 65 69 67 68 74 20 | 30 5d 20 33 20 22 5c 0a |-height |0] 3 "\.|
|00005160| 4d 6f 76 65 20 70 6f 69 | 6e 74 20 64 6f 77 6e 20 |Move poi|nt down |
|00005170| 6f 6e 65 20 72 6f 77 20 | 6f 6e 20 74 68 65 20 47 |one row |on the G|
|00005180| 6f 6d 6f 6b 75 20 62 6f | 61 72 64 2e 22 20 6e 69 |omoku bo|ard." ni|
|00005190| 6c 5d 29 0a 28 64 65 66 | 61 6c 69 61 73 20 27 67 |l]).(def|alias 'g|
|000051a0| 6f 6d 6f 6b 75 2d 6d 6f | 76 65 2d 75 70 20 23 5b |omoku-mo|ve-up #[|
|000051b0| 6e 69 6c 20 22 c0 20 19 | c2 09 84 0c 00 c3 82 17 |nil ". .|........|
|000051c0| 00 09 c3 56 83 16 00 0c | 82 17 00 c5 21 29 87 22 |...V....|....!)."|
|000051d0| 20 5b 67 6f 6d 6f 6b 75 | 2d 70 6f 69 6e 74 2d 79 | [gomoku|-point-y|
|000051e0| 20 79 20 70 72 65 76 69 | 6f 75 73 2d 6c 69 6e 65 | y previ|ous-line|
|000051f0| 20 31 20 67 6f 6d 6f 6b | 75 2d 73 71 75 61 72 65 | 1 gomok|u-square|
|00005200| 2d 68 65 69 67 68 74 20 | 30 5d 20 33 20 22 5c 0a |-height |0] 3 "\.|
|00005210| 4d 6f 76 65 20 70 6f 69 | 6e 74 20 75 70 20 6f 6e |Move poi|nt up on|
|00005220| 65 20 72 6f 77 20 6f 6e | 20 74 68 65 20 47 6f 6d |e row on| the Gom|
|00005230| 6f 6b 75 20 62 6f 61 72 | 64 2e 22 20 6e 69 6c 5d |oku boar|d." nil]|
|00005240| 29 0a 28 64 65 66 61 6c | 69 61 73 20 27 67 6f 6d |).(defal|ias 'gom|
|00005250| 6f 6b 75 2d 6d 6f 76 65 | 2d 6e 65 20 23 5b 6e 69 |oku-move|-ne #[ni|
|00005260| 6c 20 22 c0 20 88 c1 20 | 87 22 20 5b 67 6f 6d 6f |l ". .. |." [gomo|
|00005270| 6b 75 2d 6d 6f 76 65 2d | 75 70 20 67 6f 6d 6f 6b |ku-move-|up gomok|
|00005280| 75 2d 6d 6f 76 65 2d 72 | 69 67 68 74 5d 20 31 20 |u-move-r|ight] 1 |
|00005290| 22 5c 0a 4d 6f 76 65 20 | 70 6f 69 6e 74 20 4e 6f |"\.Move |point No|
|000052a0| 72 74 68 20 45 61 73 74 | 20 6f 6e 20 74 68 65 20 |rth East| on the |
|000052b0| 47 6f 6d 6f 6b 75 20 62 | 6f 61 72 64 2e 22 20 6e |Gomoku b|oard." n|
|000052c0| 69 6c 5d 29 0a 28 64 65 | 66 61 6c 69 61 73 20 27 |il]).(de|falias '|
|000052d0| 67 6f 6d 6f 6b 75 2d 6d | 6f 76 65 2d 73 65 20 23 |gomoku-m|ove-se #|
|000052e0| 5b 6e 69 6c 20 22 c0 20 | 88 c1 20 87 22 20 5b 67 |[nil ". |.. ." [g|
|000052f0| 6f 6d 6f 6b 75 2d 6d 6f | 76 65 2d 64 6f 77 6e 20 |omoku-mo|ve-down |
|00005300| 67 6f 6d 6f 6b 75 2d 6d | 6f 76 65 2d 72 69 67 68 |gomoku-m|ove-righ|
|00005310| 74 5d 20 31 20 22 5c 0a | 4d 6f 76 65 20 70 6f 69 |t] 1 "\.|Move poi|
|00005320| 6e 74 20 53 6f 75 74 68 | 20 45 61 73 74 20 6f 6e |nt South| East on|
|00005330| 20 74 68 65 20 47 6f 6d | 6f 6b 75 20 62 6f 61 72 | the Gom|oku boar|
|00005340| 64 2e 22 20 6e 69 6c 5d | 29 0a 28 64 65 66 61 6c |d." nil]|).(defal|
|00005350| 69 61 73 20 27 67 6f 6d | 6f 6b 75 2d 6d 6f 76 65 |ias 'gom|oku-move|
|00005360| 2d 6e 77 20 23 5b 6e 69 | 6c 20 22 c0 20 88 c1 20 |-nw #[ni|l ". .. |
|00005370| 87 22 20 5b 67 6f 6d 6f | 6b 75 2d 6d 6f 76 65 2d |." [gomo|ku-move-|
|00005380| 75 70 20 67 6f 6d 6f 6b | 75 2d 6d 6f 76 65 2d 6c |up gomok|u-move-l|
|00005390| 65 66 74 5d 20 31 20 22 | 5c 0a 4d 6f 76 65 20 70 |eft] 1 "|\.Move p|
|000053a0| 6f 69 6e 74 20 4e 6f 72 | 74 68 20 57 65 73 74 20 |oint Nor|th West |
|000053b0| 6f 6e 20 74 68 65 20 47 | 6f 6d 6f 6b 75 20 62 6f |on the G|omoku bo|
|000053c0| 61 72 64 2e 22 20 6e 69 | 6c 5d 29 0a 28 64 65 66 |ard." ni|l]).(def|
|000053d0| 61 6c 69 61 73 20 27 67 | 6f 6d 6f 6b 75 2d 6d 6f |alias 'g|omoku-mo|
|000053e0| 76 65 2d 73 77 20 23 5b | 6e 69 6c 20 22 c0 20 88 |ve-sw #[|nil ". .|
|000053f0| c1 20 87 22 20 5b 67 6f | 6d 6f 6b 75 2d 6d 6f 76 |. ." [go|moku-mov|
|00005400| 65 2d 64 6f 77 6e 20 67 | 6f 6d 6f 6b 75 2d 6d 6f |e-down g|omoku-mo|
|00005410| 76 65 2d 6c 65 66 74 5d | 20 31 20 22 5c 0a 4d 6f |ve-left]| 1 "\.Mo|
|00005420| 76 65 20 70 6f 69 6e 74 | 20 53 6f 75 74 68 20 57 |ve point| South W|
|00005430| 65 73 74 20 6f 6e 20 74 | 68 65 20 47 6f 6d 6f 6b |est on t|he Gomok|
|00005440| 75 20 62 6f 61 72 64 2e | 22 20 6e 69 6c 5d 29 0a |u board.|" nil]).|
|00005450| 28 70 72 6f 76 69 64 65 | 20 28 71 75 6f 74 65 20 |(provide| (quote |
|00005460| 67 6f 6d 6f 6b 75 29 29 | 0a |gomoku))|. |
+--------+-------------------------+-------------------------+--------+--------+