home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / lucid / lemacs-19.6 / lisp / packages / gomoku.elc < prev    next >
Emacs Compiled Lisp  |  1993-04-01  |  20.9 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 77 7a 40 74 68 61 |piled by| jwz@tha|
|00000020| 6c 69 64 6f 6d 69 64 65 | 20 6f 6e 20 4d 6f 6e 20 |lidomide| on Mon |
|00000030| 46 65 62 20 20 31 20 31 | 39 3a 30 39 3a 34 31 20 |Feb 1 1|9:09:41 |
|00000040| 31 39 39 33 0a 3b 3b 3b | 20 66 72 6f 6d 20 66 69 |1993.;;;| from fi|
|00000050| 6c 65 20 2f 63 61 64 69 | 6c 6c 61 63 31 2f 63 6f |le /cadi|llac1/co|
|00000060| 64 65 2f 62 75 69 6c 64 | 2f 6c 65 6d 61 63 73 2f |de/build|/lemacs/|
|00000070| 6c 69 73 70 2f 70 61 63 | 6b 61 67 65 73 2f 67 6f |lisp/pac|kages/go|
|00000080| 6d 6f 6b 75 2e 65 6c 0a | 3b 3b 3b 20 65 6d 61 63 |moku.el.|;;; emac|
|00000090| 73 20 76 65 72 73 69 6f | 6e 20 31 39 2e 34 2e 31 |s versio|n 19.4.1|
|000000a0| 33 20 4c 75 63 69 64 2e | 0a 3b 3b 3b 20 62 79 74 |3 Lucid.|.;;; byt|
|000000b0| 65 63 6f 6d 70 20 76 65 | 72 73 69 6f 6e 20 32 2e |ecomp ve|rsion 2.|
|000000c0| 31 30 3b 20 20 31 2d 66 | 65 62 2d 39 33 2e 0a 3b |10; 1-f|eb-93..;|
|000000d0| 3b 3b 20 6f 70 74 69 6d | 69 7a 61 74 69 6f 6e 20 |;; optim|ization |
|000000e0| 69 73 20 6f 6e 2e 0a 3b | 3b 3b 20 74 68 69 73 20 |is on..;|;; this |
|000000f0| 66 69 6c 65 20 75 73 65 | 73 20 6f 70 63 6f 64 65 |file use|s opcode|
|00000100| 73 20 77 68 69 63 68 20 | 64 6f 20 6e 6f 74 20 65 |s which |do not e|
|00000110| 78 69 73 74 20 69 6e 20 | 45 6d 61 63 73 31 38 2e |xist in |Emacs18.|
|00000120| 0a 0a 28 69 66 20 28 61 | 6e 64 20 28 62 6f 75 6e |..(if (a|nd (boun|
|00000130| 64 70 20 27 65 6d 61 63 | 73 2d 76 65 72 73 69 6f |dp 'emac|s-versio|
|00000140| 6e 29 0a 09 20 28 6f 72 | 20 28 61 6e 64 20 28 62 |n).. (or| (and (b|
|00000150| 6f 75 6e 64 70 20 27 65 | 70 6f 63 68 3a 3a 76 65 |oundp 'e|poch::ve|
|00000160| 72 73 69 6f 6e 29 20 65 | 70 6f 63 68 3a 3a 76 65 |rsion) e|poch::ve|
|00000170| 72 73 69 6f 6e 29 0a 09 | 20 20 20 20 20 28 73 74 |rsion)..| (st|
|00000180| 72 69 6e 67 2d 6c 65 73 | 73 70 20 65 6d 61 63 73 |ring-les|sp emacs|
|00000190| 2d 76 65 72 73 69 6f 6e | 20 22 31 39 22 29 29 29 |-version| "19")))|
|000001a0| 0a 20 20 20 20 28 65 72 | 72 6f 72 20 22 54 68 69 |. (er|ror "Thi|
|000001b0| 73 20 66 69 6c 65 20 77 | 61 73 20 63 6f 6d 70 69 |s file w|as compi|
|000001c0| 6c 65 64 20 66 6f 72 20 | 45 6d 61 63 73 31 39 2e |led for |Emacs19.|
|000001d0| 22 29 29 0a 0a 28 70 72 | 6f 76 69 64 65 20 27 67 |"))..(pr|ovide 'g|
|000001e0| 6f 6d 6f 6b 75 29 0a 28 | 64 65 66 76 61 72 20 67 |omoku).(|defvar g|
|000001f0| 6f 6d 6f 6b 75 2d 6d 6f | 64 65 2d 68 6f 6f 6b 20 |omoku-mo|de-hook |
|00000200| 6e 69 6c 20 22 5c 0a 49 | 66 20 6e 6f 6e 2d 6e 69 |nil "\.I|f non-ni|
|00000210| 6c 2c 20 69 74 73 20 76 | 61 6c 75 65 20 69 73 20 |l, its v|alue is |
|00000220| 63 61 6c 6c 65 64 20 6f | 6e 20 65 6e 74 72 79 20 |called o|n entry |
|00000230| 74 6f 20 47 6f 6d 6f 6b | 75 20 6d 6f 64 65 2e 22 |to Gomok|u mode."|
|00000240| 29 0a 28 64 65 66 76 61 | 72 20 67 6f 6d 6f 6b 75 |).(defva|r gomoku|
|00000250| 2d 6d 6f 64 65 2d 6d 61 | 70 20 6e 69 6c 20 22 5c |-mode-ma|p nil "\|
|00000260| 0a 4c 6f 63 61 6c 20 6b | 65 79 6d 61 70 20 74 6f |.Local k|eymap to|
|00000270| 20 75 73 65 20 69 6e 20 | 47 6f 6d 6f 6b 75 20 6d | use in |Gomoku m|
|00000280| 6f 64 65 2e 22 29 0a 28 | 62 79 74 65 2d 63 6f 64 |ode.").(|byte-cod|
|00000290| 65 20 22 08 84 be 00 c1 | 20 10 c2 08 c3 c4 23 88 |e ".....| .....#.|
|000002a0| c2 08 c5 c6 23 88 c2 08 | c7 c8 23 88 c2 08 c9 ca |....#...|..#.....|
|000002b0| 23 88 c2 08 cb cc 23 88 | c2 08 cd ce 23 88 c2 08 |#.....#.|....#...|
|000002c0| cf d0 23 88 c2 08 d1 d2 | 23 88 c2 08 d3 d0 23 88 |..#.....|#.....#.|
|000002d0| c2 08 d4 d2 23 88 c2 08 | d5 ce 23 88 c2 08 d6 cc |....#...|..#.....|
|000002e0| 23 88 c2 08 d7 d8 23 88 | c2 08 d9 d8 23 88 c2 08 |#.....#.|....#...|
|000002f0| da d8 23 88 c2 08 db d8 | 23 88 c2 08 dc dd 23 88 |..#.....|#.....#.|
|00000300| c2 08 de df 23 88 c2 08 | e0 e1 23 88 e2 e3 21 ab |....#...|..#...!.|
|00000310| c0 e4 1e 25 e6 e7 21 89 | 16 25 ab 87 c2 08 0e 25 |...%..!.|.%.....%|
|00000320| d2 23 88 e6 e8 21 89 16 | 25 ab 87 c2 08 0e 25 d0 |.#...!..|%.....%.|
|00000330| 23 88 e6 e9 21 89 16 25 | ab 87 c2 08 0e 25 cc 23 |#...!..%|.....%.#|
|00000340| 88 e6 ea 21 89 16 25 ab | 87 c2 08 0e 25 ce 23 88 |...!..%.|....%.#.|
|00000350| 29 e4 87 22 20 5b 67 6f | 6d 6f 6b 75 2d 6d 6f 64 |).." [go|moku-mod|
|00000360| 65 2d 6d 61 70 20 6d 61 | 6b 65 2d 73 70 61 72 73 |e-map ma|ke-spars|
|00000370| 65 2d 6b 65 79 6d 61 70 | 20 64 65 66 69 6e 65 2d |e-keymap| define-|
|00000380| 6b 65 79 20 22 79 22 20 | 67 6f 6d 6f 6b 75 2d 6d |key "y" |gomoku-m|
|00000390| 6f 76 65 2d 6e 77 20 22 | 75 22 20 67 6f 6d 6f 6b |ove-nw "|u" gomok|
|000003a0| 75 2d 6d 6f 76 65 2d 6e | 65 20 22 62 22 20 67 6f |u-move-n|e "b" go|
|000003b0| 6d 6f 6b 75 2d 6d 6f 76 | 65 2d 73 77 20 22 6e 22 |moku-mov|e-sw "n"|
|000003c0| 20 67 6f 6d 6f 6b 75 2d | 6d 6f 76 65 2d 73 65 20 | gomoku-|move-se |
|000003d0| 22 68 22 20 67 6f 6d 6f | 6b 75 2d 6d 6f 76 65 2d |"h" gomo|ku-move-|
|000003e0| 6c 65 66 74 20 22 6c 22 | 20 67 6f 6d 6f 6b 75 2d |left "l"| gomoku-|
|000003f0| 6d 6f 76 65 2d 72 69 67 | 68 74 20 22 6a 22 20 67 |move-rig|ht "j" g|
|00000400| 6f 6d 6f 6b 75 2d 6d 6f | 76 65 2d 64 6f 77 6e 20 |omoku-mo|ve-down |
|00000410| 22 6b 22 20 67 6f 6d 6f | 6b 75 2d 6d 6f 76 65 2d |"k" gomo|ku-move-|
|00000420| 75 70 20 22 0e 22 20 22 | 10 22 20 22 06 22 20 22 |up "." "|." "." "|
|00000430| 02 22 20 22 58 22 20 67 | 6f 6d 6f 6b 75 2d 68 75 |." "X" g|omoku-hu|
|00000440| 6d 61 6e 2d 70 6c 61 79 | 73 20 22 78 22 20 22 0d |man-play|s "x" ".|
|00000450| 22 20 22 03 70 22 20 22 | 03 62 22 20 67 6f 6d 6f |" ".p" "|.b" gomo|
|00000460| 6b 75 2d 68 75 6d 61 6e | 2d 74 61 6b 65 73 2d 62 |ku-human|-takes-b|
|00000470| 61 63 6b 20 22 03 72 22 | 20 67 6f 6d 6f 6b 75 2d |ack ".r"| gomoku-|
|00000480| 68 75 6d 61 6e 2d 72 65 | 73 69 67 6e 73 20 22 03 |human-re|signs ".|
|00000490| 65 22 20 67 6f 6d 6f 6b | 75 2d 65 6d 61 63 73 2d |e" gomok|u-emacs-|
|000004a0| 70 6c 61 79 73 20 66 65 | 61 74 75 72 65 70 20 6b |plays fe|aturep k|
|000004b0| 65 79 70 61 64 20 6e 69 | 6c 20 6b 65 79 73 20 66 |eypad ni|l keys f|
|000004c0| 75 6e 63 74 69 6f 6e 2d | 6b 65 79 2d 73 65 71 75 |unction-|key-sequ|
|000004d0| 65 6e 63 65 20 31 31 37 | 20 31 30 30 20 31 30 38 |ence 117| 100 108|
|000004e0| 20 31 31 34 5d 20 34 29 | 0a 28 66 73 65 74 20 27 | 114] 4)|.(fset '|
|000004f0| 67 6f 6d 6f 6b 75 2d 6d | 6f 64 65 20 23 5b 6e 69 |gomoku-m|ode #[ni|
|00000500| 6c 20 22 c0 11 c2 13 c4 | 20 88 c5 0e 06 21 88 c7 |l ".....| ....!..|
|00000510| c8 21 87 22 20 5b 67 6f | 6d 6f 6b 75 2d 6d 6f 64 |.!." [go|moku-mod|
|00000520| 65 20 6d 61 6a 6f 72 2d | 6d 6f 64 65 20 22 47 6f |e major-|mode "Go|
|00000530| 6d 6f 6b 75 22 20 6d 6f | 64 65 2d 6e 61 6d 65 20 |moku" mo|de-name |
|00000540| 67 6f 6d 6f 6b 75 2d 64 | 69 73 70 6c 61 79 2d 73 |gomoku-d|isplay-s|
|00000550| 74 61 74 69 73 74 69 63 | 73 20 75 73 65 2d 6c 6f |tatistic|s use-lo|
|00000560| 63 61 6c 2d 6d 61 70 20 | 67 6f 6d 6f 6b 75 2d 6d |cal-map |gomoku-m|
|00000570| 6f 64 65 2d 6d 61 70 20 | 72 75 6e 2d 68 6f 6f 6b |ode-map |run-hook|
|00000580| 73 20 67 6f 6d 6f 6b 75 | 2d 6d 6f 64 65 2d 68 6f |s gomoku|-mode-ho|
|00000590| 6f 6b 5d 20 32 20 22 5c | 0a 4d 61 6a 6f 72 20 6d |ok] 2 "\|.Major m|
|000005a0| 6f 64 65 20 66 6f 72 20 | 70 6c 61 79 69 6e 67 20 |ode for |playing |
|000005b0| 47 6f 6d 6f 6b 75 20 61 | 67 61 69 6e 73 74 20 45 |Gomoku a|gainst E|
|000005c0| 6d 61 63 73 2e 0a 59 6f | 75 20 61 6e 64 20 45 6d |macs..Yo|u and Em|
|000005d0| 61 63 73 20 70 6c 61 79 | 20 69 6e 20 74 75 72 6e |acs play| in turn|
|000005e0| 20 62 79 20 6d 61 72 6b | 69 6e 67 20 61 20 66 72 | by mark|ing a fr|
|000005f0| 65 65 20 73 71 75 61 72 | 65 2e 20 59 6f 75 20 6d |ee squar|e. You m|
|00000600| 61 72 6b 20 69 74 20 77 | 69 74 68 20 58 0a 61 6e |ark it w|ith X.an|
|00000610| 64 20 45 6d 61 63 73 20 | 6d 61 72 6b 73 20 69 74 |d Emacs |marks it|
|00000620| 20 77 69 74 68 20 4f 2e | 20 54 68 65 20 77 69 6e | with O.| The win|
|00000630| 6e 65 72 20 69 73 20 74 | 68 65 20 66 69 72 73 74 |ner is t|he first|
|00000640| 20 74 6f 20 67 65 74 20 | 66 69 76 65 20 63 6f 6e | to get |five con|
|00000650| 74 69 67 75 6f 75 73 0a | 6d 61 72 6b 73 20 68 6f |tiguous.|marks ho|
|00000660| 72 69 7a 6f 6e 74 61 6c | 6c 79 2c 20 76 65 72 74 |rizontal|ly, vert|
|00000670| 69 63 61 6c 6c 79 20 6f | 72 20 69 6e 20 64 69 61 |ically o|r in dia|
|00000680| 67 6f 6e 61 6c 2e 0a 59 | 6f 75 20 70 6c 61 79 20 |gonal..Y|ou play |
|00000690| 62 79 20 6d 6f 76 69 6e | 67 20 74 68 65 20 63 75 |by movin|g the cu|
|000006a0| 72 73 6f 72 20 6f 76 65 | 72 20 74 68 65 20 73 71 |rsor ove|r the sq|
|000006b0| 75 61 72 65 20 79 6f 75 | 20 63 68 6f 6f 73 65 20 |uare you| choose |
|000006c0| 61 6e 64 20 68 69 74 74 | 69 6e 67 20 52 45 54 2c |and hitt|ing RET,|
|000006d0| 0a 78 2c 20 2e 2e 20 6f | 72 20 77 68 61 74 65 76 |.x, .. o|r whatev|
|000006e0| 65 72 20 68 61 73 20 62 | 65 65 6e 20 73 65 74 20 |er has b|een set |
|000006f0| 6c 6f 63 61 6c 6c 79 2e | 0a 0a 4f 74 68 65 72 20 |locally.|..Other |
|00000700| 75 73 65 66 75 6c 20 63 | 6f 6d 6d 61 6e 64 73 3a |useful c|ommands:|
|00000710| 0a 0a 43 2d 63 20 72 09 | 49 6e 64 69 63 61 74 65 |..C-c r.|Indicate|
|00000720| 20 74 68 61 74 20 79 6f | 75 20 72 65 73 69 67 6e | that yo|u resign|
|00000730| 2c 0a 43 2d 63 20 74 09 | 54 61 6b 65 20 62 61 63 |,.C-c t.|Take bac|
|00000740| 6b 20 79 6f 75 72 20 6c | 61 73 74 20 6d 6f 76 65 |k your l|ast move|
|00000750| 2c 0a 43 2d 63 20 65 09 | 41 73 6b 20 66 6f 72 20 |,.C-c e.|Ask for |
|00000760| 45 6d 61 63 73 20 74 6f | 20 70 6c 61 79 20 28 74 |Emacs to| play (t|
|00000770| 68 75 73 20 70 61 73 73 | 69 6e 67 29 2e 0a 0a 43 |hus pass|ing)...C|
|00000780| 6f 6d 6d 61 6e 64 73 3a | 0a 5c 5c 7b 67 6f 6d 6f |ommands:|.\\{gomo|
|00000790| 6b 75 2d 6d 6f 64 65 2d | 6d 61 70 7d 0a 45 6e 74 |ku-mode-|map}.Ent|
|000007a0| 72 79 20 74 6f 20 74 68 | 69 73 20 6d 6f 64 65 20 |ry to th|is mode |
|000007b0| 63 61 6c 6c 73 20 74 68 | 65 20 76 61 6c 75 65 20 |calls th|e value |
|000007c0| 6f 66 20 67 6f 6d 6f 6b | 75 2d 6d 6f 64 65 2d 68 |of gomok|u-mode-h|
|000007d0| 6f 6f 6b 0a 69 66 20 74 | 68 61 74 20 76 61 6c 75 |ook.if t|hat valu|
|000007e0| 65 20 69 73 20 6e 6f 6e | 2d 6e 69 6c 2e 22 20 6e |e is non|-nil." n|
|000007f0| 69 6c 5d 29 0a 28 64 65 | 66 76 61 72 20 67 6f 6d |il]).(de|fvar gom|
|00000800| 6f 6b 75 2d 62 6f 61 72 | 64 2d 77 69 64 74 68 20 |oku-boar|d-width |
|00000810| 6e 69 6c 20 22 5c 0a 4e | 75 6d 62 65 72 20 6f 66 |nil "\.N|umber of|
|00000820| 20 63 6f 6c 75 6d 6e 73 | 20 6f 6e 20 74 68 65 20 | columns| on the |
|00000830| 47 6f 6d 6f 6b 75 20 62 | 6f 61 72 64 2e 22 29 0a |Gomoku b|oard.").|
|00000840| 28 64 65 66 76 61 72 20 | 67 6f 6d 6f 6b 75 2d 62 |(defvar |gomoku-b|
|00000850| 6f 61 72 64 2d 68 65 69 | 67 68 74 20 6e 69 6c 20 |oard-hei|ght nil |
|00000860| 22 5c 0a 4e 75 6d 62 65 | 72 20 6f 66 20 6c 69 6e |"\.Numbe|r of lin|
|00000870| 65 73 20 6f 6e 20 74 68 | 65 20 47 6f 6d 6f 6b 75 |es on th|e Gomoku|
|00000880| 20 62 6f 61 72 64 2e 22 | 29 0a 28 64 65 66 76 61 | board."|).(defva|
|00000890| 72 20 67 6f 6d 6f 6b 75 | 2d 62 6f 61 72 64 20 6e |r gomoku|-board n|
|000008a0| 69 6c 20 22 5c 0a 56 65 | 63 74 6f 72 20 72 65 63 |il "\.Ve|ctor rec|
|000008b0| 6f 72 64 69 6e 67 20 74 | 68 65 20 61 63 74 75 61 |ording t|he actua|
|000008c0| 6c 20 73 74 61 74 65 20 | 6f 66 20 74 68 65 20 47 |l state |of the G|
|000008d0| 6f 6d 6f 6b 75 20 62 6f | 61 72 64 2e 22 29 0a 28 |omoku bo|ard.").(|
|000008e0| 64 65 66 76 61 72 20 67 | 6f 6d 6f 6b 75 2d 76 65 |defvar g|omoku-ve|
|000008f0| 63 74 6f 72 2d 6c 65 6e | 67 74 68 20 6e 69 6c 20 |ctor-len|gth nil |
|00000900| 22 5c 0a 4c 65 6e 67 74 | 68 20 6f 66 20 67 6f 6d |"\.Lengt|h of gom|
|00000910| 6f 6b 75 2d 62 6f 61 72 | 64 20 76 65 63 74 6f 72 |oku-boar|d vector|
|00000920| 2e 22 29 0a 28 64 65 66 | 76 61 72 20 67 6f 6d 6f |.").(def|var gomo|
|00000930| 6b 75 2d 64 72 61 77 2d | 6c 69 6d 69 74 20 6e 69 |ku-draw-|limit ni|
|00000940| 6c 20 22 5c 0a 41 66 74 | 65 72 20 68 6f 77 20 6d |l "\.Aft|er how m|
|00000950| 61 6e 79 20 6d 6f 76 65 | 73 20 77 69 6c 6c 20 45 |any move|s will E|
|00000960| 6d 61 63 73 20 6f 66 66 | 65 72 20 61 20 64 72 61 |macs off|er a dra|
|00000970| 77 20 3f 22 29 0a 28 66 | 73 65 74 20 27 67 6f 6d |w ?").(f|set 'gom|
|00000980| 6f 6b 75 2d 78 79 2d 74 | 6f 2d 69 6e 64 65 78 20 |oku-xy-t|o-index |
|00000990| 23 5b 28 78 20 79 29 20 | 22 08 09 5f 5c 6e 08 5c |#[(x y) |".._\n.\|
|000009a0| 5c 5c 5c 87 22 20 5b 79 | 20 67 6f 6d 6f 6b 75 2d |\\\." [y| gomoku-|
|000009b0| 62 6f 61 72 64 2d 77 69 | 64 74 68 20 78 5d 20 33 |board-wi|dth x] 3|
|000009c0| 20 22 5c 0a 54 72 61 6e | 73 6c 61 74 65 20 58 2c | "\.Tran|slate X,|
|000009d0| 20 59 20 63 61 72 74 65 | 73 69 61 6e 20 63 6f 6f | Y carte|sian coo|
|000009e0| 72 64 73 20 69 6e 74 6f | 20 74 68 65 20 63 6f 72 |rds into| the cor|
|000009f0| 72 65 73 70 6f 6e 64 69 | 6e 67 20 62 6f 61 72 64 |respondi|ng board|
|00000a00| 20 69 6e 64 65 78 2e 22 | 5d 29 0a 28 66 73 65 74 | index."|]).(fset|
|00000a10| 20 27 67 6f 6d 6f 6b 75 | 2d 69 6e 64 65 78 2d 74 | 'gomoku|-index-t|
|00000a20| 6f 2d 78 20 23 5b 28 69 | 6e 64 65 78 29 20 22 08 |o-x #[(i|ndex) ".|
|00000a30| 09 54 a6 87 22 20 5b 69 | 6e 64 65 78 20 67 6f 6d |.T.." [i|ndex gom|
|00000a40| 6f 6b 75 2d 62 6f 61 72 | 64 2d 77 69 64 74 68 5d |oku-boar|d-width]|
|00000a50| 20 32 20 22 5c 0a 52 65 | 74 75 72 6e 20 63 6f 72 | 2 "\.Re|turn cor|
|00000a60| 72 65 73 70 6f 6e 64 69 | 6e 67 20 78 2d 63 6f 6f |respondi|ng x-coo|
|00000a70| 72 64 20 6f 66 20 62 6f | 61 72 64 20 49 4e 44 45 |rd of bo|ard INDE|
|00000a80| 58 2e 22 5d 29 0a 28 66 | 73 65 74 20 27 67 6f 6d |X."]).(f|set 'gom|
|00000a90| 6f 6b 75 2d 69 6e 64 65 | 78 2d 74 6f 2d 79 20 23 |oku-inde|x-to-y #|
|00000aa0| 5b 28 69 6e 64 65 78 29 | 20 22 08 09 54 a5 87 22 |[(index)| "..T.."|
|00000ab0| 20 5b 69 6e 64 65 78 20 | 67 6f 6d 6f 6b 75 2d 62 | [index |gomoku-b|
|00000ac0| 6f 61 72 64 2d 77 69 64 | 74 68 5d 20 32 20 22 5c |oard-wid|th] 2 "\|
|00000ad0| 0a 52 65 74 75 72 6e 20 | 63 6f 72 72 65 73 70 6f |.Return |correspo|
|00000ae0| 6e 64 69 6e 67 20 79 2d | 63 6f 6f 72 64 20 6f 66 |nding y-|coord of|
|00000af0| 20 62 6f 61 72 64 20 49 | 4e 44 45 58 2e 22 5d 29 | board I|NDEX."])|
|00000b00| 0a 28 66 73 65 74 20 27 | 67 6f 6d 6f 6b 75 2d 69 |.(fset '|gomoku-i|
|00000b10| 6e 69 74 2d 62 6f 61 72 | 64 20 23 5b 6e 69 6c 20 |nit-boar|d #[nil |
|00000b20| 22 c0 09 c2 5c 22 13 c2 | 09 53 1c 1d 0d 0e 06 58 |"...\"..|.S.....X|
|00000b30| ab 92 0b 0d c7 49 88 0b | 0c c7 49 88 0d 54 15 0c |.....I..|..I..T..|
|00000b40| 53 14 aa 68 2a c2 1d c2 | 09 57 ad 8f 0b 0d c7 49 |S..h*...|.W.....I|
|00000b50| 88 0d 0e 06 c8 5c 5c 5c | 5c 89 15 aa 6d 29 87 22 |.....\\\|\...m)."|
|00000b60| 20 5b 6d 61 6b 65 2d 76 | 65 63 74 6f 72 20 67 6f | [make-v|ector go|
|00000b70| 6d 6f 6b 75 2d 76 65 63 | 74 6f 72 2d 6c 65 6e 67 |moku-vec|tor-leng|
|00000b80| 74 68 20 30 20 67 6f 6d | 6f 6b 75 2d 62 6f 61 72 |th 0 gom|oku-boar|
|00000b90| 64 20 69 69 20 69 20 67 | 6f 6d 6f 6b 75 2d 62 6f |d ii i g|omoku-bo|
|00000ba0| 61 72 64 2d 77 69 64 74 | 68 20 2d 31 20 31 5d 20 |ard-widt|h -1 1] |
|00000bb0| 34 20 22 5c 0a 43 72 65 | 61 74 65 20 74 68 65 20 |4 "\.Cre|ate the |
|00000bc0| 67 6f 6d 6f 6b 75 2d 62 | 6f 61 72 64 20 76 65 63 |gomoku-b|oard vec|
|00000bd0| 74 6f 72 20 61 6e 64 20 | 66 69 6c 6c 20 69 74 20 |tor and |fill it |
|00000be0| 77 69 74 68 20 69 6e 69 | 74 69 61 6c 20 76 61 6c |with ini|tial val|
|00000bf0| 75 65 73 2e 22 5d 29 0a | 28 64 65 66 76 61 72 20 |ues."]).|(defvar |
|00000c00| 67 6f 6d 6f 6b 75 2d 73 | 63 6f 72 65 2d 74 61 62 |gomoku-s|core-tab|
|00000c10| 6c 65 20 6e 69 6c 20 22 | 5c 0a 56 65 63 74 6f 72 |le nil "|\.Vector|
|00000c20| 20 72 65 63 6f 72 64 69 | 6e 67 20 74 68 65 20 61 | recordi|ng the a|
|00000c30| 63 74 75 61 6c 20 73 63 | 6f 72 65 20 6f 66 20 74 |ctual sc|ore of t|
|00000c40| 68 65 20 66 72 65 65 20 | 73 71 75 61 72 65 73 2e |he free |squares.|
|00000c50| 22 29 0a 28 64 65 66 63 | 6f 6e 73 74 20 6e 69 6c |").(defc|onst nil|
|00000c60| 2d 73 63 6f 72 65 20 37 | 20 22 5c 0a 53 63 6f 72 |-score 7| "\.Scor|
|00000c70| 65 20 6f 66 20 61 6e 20 | 65 6d 70 74 79 20 71 74 |e of an |empty qt|
|00000c80| 75 70 6c 65 2e 22 29 0a | 28 64 65 66 63 6f 6e 73 |uple.").|(defcons|
|00000c90| 74 20 58 73 63 6f 72 65 | 20 31 35 20 22 5c 0a 53 |t Xscore| 15 "\.S|
|00000ca0| 63 6f 72 65 20 6f 66 20 | 61 20 71 74 75 70 6c 65 |core of |a qtuple|
|00000cb0| 20 63 6f 6e 74 61 69 6e | 69 6e 67 20 6f 6e 65 20 | contain|ing one |
|00000cc0| 58 2e 22 29 0a 28 64 65 | 66 63 6f 6e 73 74 20 58 |X.").(de|fconst X|
|00000cd0| 58 73 63 6f 72 65 20 34 | 30 30 20 22 5c 0a 53 63 |Xscore 4|00 "\.Sc|
|00000ce0| 6f 72 65 20 6f 66 20 61 | 20 71 74 75 70 6c 65 20 |ore of a| qtuple |
|00000cf0| 63 6f 6e 74 61 69 6e 69 | 6e 67 20 74 77 6f 20 58 |containi|ng two X|
|00000d00| 27 73 2e 22 29 0a 28 64 | 65 66 63 6f 6e 73 74 20 |'s.").(d|efconst |
|00000d10| 58 58 58 73 63 6f 72 65 | 20 31 38 30 30 20 22 5c |XXXscore| 1800 "\|
|00000d20| 0a 53 63 6f 72 65 20 6f | 66 20 61 20 71 74 75 70 |.Score o|f a qtup|
|00000d30| 6c 65 20 63 6f 6e 74 61 | 69 6e 69 6e 67 20 74 68 |le conta|ining th|
|00000d40| 72 65 65 20 58 27 73 2e | 22 29 0a 28 64 65 66 63 |ree X's.|").(defc|
|00000d50| 6f 6e 73 74 20 58 58 58 | 58 73 63 6f 72 65 20 31 |onst XXX|Xscore 1|
|00000d60| 30 30 30 30 30 20 22 5c | 0a 53 63 6f 72 65 20 6f |00000 "\|.Score o|
|00000d70| 66 20 61 20 71 74 75 70 | 6c 65 20 63 6f 6e 74 61 |f a qtup|le conta|
|00000d80| 69 6e 69 6e 67 20 66 6f | 75 72 20 58 27 73 2e 22 |ining fo|ur X's."|
|00000d90| 29 0a 28 64 65 66 63 6f | 6e 73 74 20 4f 73 63 6f |).(defco|nst Osco|
|00000da0| 72 65 20 33 35 20 22 5c | 0a 53 63 6f 72 65 20 6f |re 35 "\|.Score o|
|00000db0| 66 20 61 20 71 74 75 70 | 6c 65 20 63 6f 6e 74 61 |f a qtup|le conta|
|00000dc0| 69 6e 69 6e 67 20 6f 6e | 65 20 4f 2e 22 29 0a 28 |ining on|e O.").(|
|00000dd0| 64 65 66 63 6f 6e 73 74 | 20 4f 4f 73 63 6f 72 65 |defconst| OOscore|
|00000de0| 20 38 30 30 20 22 5c 0a | 53 63 6f 72 65 20 6f 66 | 800 "\.|Score of|
|00000df0| 20 61 20 71 74 75 70 6c | 65 20 63 6f 6e 74 61 69 | a qtupl|e contai|
|00000e00| 6e 69 6e 67 20 74 77 6f | 20 4f 27 73 2e 22 29 0a |ning two| O's.").|
|00000e10| 28 64 65 66 63 6f 6e 73 | 74 20 4f 4f 4f 73 63 6f |(defcons|t OOOsco|
|00000e20| 72 65 20 31 35 30 30 30 | 20 22 5c 0a 53 63 6f 72 |re 15000| "\.Scor|
|00000e30| 65 20 6f 66 20 61 20 71 | 74 75 70 6c 65 20 63 6f |e of a q|tuple co|
|00000e40| 6e 74 61 69 6e 69 6e 67 | 20 74 68 72 65 65 20 4f |ntaining| three O|
|00000e50| 27 73 2e 22 29 0a 28 64 | 65 66 63 6f 6e 73 74 20 |'s.").(d|efconst |
|00000e60| 4f 4f 4f 4f 73 63 6f 72 | 65 20 38 30 30 30 30 30 |OOOOscor|e 800000|
|00000e70| 20 22 5c 0a 53 63 6f 72 | 65 20 6f 66 20 61 20 71 | "\.Scor|e of a q|
|00000e80| 74 75 70 6c 65 20 63 6f | 6e 74 61 69 6e 69 6e 67 |tuple co|ntaining|
|00000e90| 20 66 6f 75 72 20 4f 27 | 73 2e 22 29 0a 28 64 65 | four O'|s.").(de|
|00000ea0| 66 63 6f 6e 73 74 20 67 | 6f 6d 6f 6b 75 2d 73 63 |fconst g|omoku-sc|
|00000eb0| 6f 72 65 2d 74 72 61 6e | 73 2d 74 61 62 6c 65 20 |ore-tran|s-table |
|00000ec0| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c0 09 5c 6e |(byte-co|de "..\n|
|00000ed0| 0b 0c 0d c6 0e 07 c6 89 | 89 89 89 0e 08 c6 89 89 |........|........|
|00000ee0| 89 89 0e 09 c6 89 89 89 | 89 0e 5c 6e c6 89 89 89 |........|..\n....|
|00000ef0| 89 89 26 1f 87 22 20 5b | 76 65 63 74 6f 72 20 6e |..&.." [|vector n|
|00000f00| 69 6c 2d 73 63 6f 72 65 | 20 58 73 63 6f 72 65 20 |il-score| Xscore |
|00000f10| 58 58 73 63 6f 72 65 20 | 58 58 58 73 63 6f 72 65 |XXscore |XXXscore|
|00000f20| 20 58 58 58 58 73 63 6f | 72 65 20 30 20 4f 73 63 | XXXXsco|re 0 Osc|
|00000f30| 6f 72 65 20 4f 4f 73 63 | 6f 72 65 20 4f 4f 4f 73 |ore OOsc|ore OOOs|
|00000f40| 63 6f 72 65 20 4f 4f 4f | 4f 73 63 6f 72 65 5d 20 |core OOO|Oscore] |
|00000f50| 33 32 29 20 22 5c 0a 56 | 65 63 74 6f 72 20 61 73 |32) "\.V|ector as|
|00000f60| 73 6f 63 69 61 74 69 6e | 67 20 71 74 75 70 6c 65 |sociatin|g qtuple|
|00000f70| 20 63 6f 6e 74 65 6e 74 | 73 20 74 6f 20 74 68 65 | content|s to the|
|00000f80| 69 72 20 73 63 6f 72 65 | 2e 22 29 0a 28 64 65 66 |ir score|.").(def|
|00000f90| 63 6f 6e 73 74 20 67 6f | 6d 6f 6b 75 2d 77 69 6e |const go|moku-win|
|00000fa0| 6e 69 6e 67 2d 74 68 72 | 65 73 68 6f 6c 64 20 4f |ning-thr|eshold O|
|00000fb0| 4f 4f 4f 73 63 6f 72 65 | 20 22 5c 0a 54 68 72 65 |OOOscore| "\.Thre|
|00000fc0| 73 68 6f 6c 64 20 73 63 | 6f 72 65 20 62 65 79 6f |shold sc|ore beyo|
|00000fd0| 6e 64 20 77 68 69 63 68 | 20 61 6e 20 65 6d 61 63 |nd which| an emac|
|00000fe0| 73 20 6d 6f 76 65 20 69 | 73 20 77 69 6e 6e 69 6e |s move i|s winnin|
|00000ff0| 67 2e 22 29 0a 28 64 65 | 66 63 6f 6e 73 74 20 67 |g.").(de|fconst g|
|00001000| 6f 6d 6f 6b 75 2d 6c 6f | 6f 73 69 6e 67 2d 74 68 |omoku-lo|osing-th|
|00001010| 72 65 73 68 6f 6c 64 20 | 58 58 58 58 73 63 6f 72 |reshold |XXXXscor|
|00001020| 65 20 22 5c 0a 54 68 72 | 65 73 68 6f 6c 64 20 73 |e "\.Thr|eshold s|
|00001030| 63 6f 72 65 20 62 65 79 | 6f 6e 64 20 77 68 69 63 |core bey|ond whic|
|00001040| 68 20 61 20 68 75 6d 61 | 6e 20 6d 6f 76 65 20 69 |h a huma|n move i|
|00001050| 73 20 77 69 6e 6e 69 6e | 67 2e 22 29 0a 28 66 73 |s winnin|g.").(fs|
|00001060| 65 74 20 27 67 6f 6d 6f | 6b 75 2d 73 74 72 6f 6e |et 'gomo|ku-stron|
|00001070| 67 65 73 74 2d 73 71 75 | 61 72 65 20 23 5b 6e 69 |gest-squ|are #[ni|
|00001080| 6c 20 22 c0 89 c1 c2 89 | 5c 22 c1 0b 0c 5c 22 c5 |l ".....|\"...\".|
|00001090| 89 1e 06 1e 07 1e 08 1e | 09 1e 5c 6e 1e 0b 0e 09 |........|..\n....|
|000010a0| 0e 08 58 ab e5 0e 0c 0e | 09 48 0e 0b 57 ac d3 0e |..X.....|.H..W...|
|000010b0| 0c 0e 09 48 89 16 06 0e | 0b 56 ab 9f 0e 0d 0e 09 |...H....|.V......|
|000010c0| 48 c0 55 ab 8d c2 16 5c | 6e 0e 09 16 07 0e 06 16 |H.U....\|n.......|
|000010d0| 0b aa b0 0e 0c 0e 09 ce | 49 88 aa a7 0e 0d 0e 09 |........|I.......|
|000010e0| 48 c0 55 ac 89 0e 0c 0e | 09 ce 49 88 aa 95 0e 5c |H.U.....|..I....\|
|000010f0| 6e cf 0e 5c 6e 54 89 16 | 5c 6e 21 55 ab 88 0e 09 |n..\nT..|\n!U....|
|00001100| 16 07 0e 06 16 0b 0e 09 | 54 89 16 09 aa 16 0e 07 |........|T.......|
|00001110| 2e 06 87 22 20 5b 30 20 | 67 6f 6d 6f 6b 75 2d 78 |..." [0 |gomoku-x|
|00001120| 79 2d 74 6f 2d 69 6e 64 | 65 78 20 31 20 67 6f 6d |y-to-ind|ex 1 gom|
|00001130| 6f 6b 75 2d 62 6f 61 72 | 64 2d 77 69 64 74 68 20 |oku-boar|d-width |
|00001140| 67 6f 6d 6f 6b 75 2d 62 | 6f 61 72 64 2d 68 65 69 |gomoku-b|oard-hei|
|00001150| 67 68 74 20 6e 69 6c 20 | 73 63 6f 72 65 20 62 65 |ght nil |score be|
|00001160| 73 74 2d 73 71 75 61 72 | 65 20 65 6e 64 20 73 71 |st-squar|e end sq|
|00001170| 75 61 72 65 20 63 6f 75 | 6e 74 20 73 63 6f 72 65 |uare cou|nt score|
|00001180| 2d 6d 61 78 20 67 6f 6d | 6f 6b 75 2d 73 63 6f 72 |-max gom|oku-scor|
|00001190| 65 2d 74 61 62 6c 65 20 | 67 6f 6d 6f 6b 75 2d 62 |e-table |gomoku-b|
|000011a0| 6f 61 72 64 20 2d 31 20 | 72 61 6e 64 6f 6d 2d 6e |oard -1 |random-n|
|000011b0| 75 6d 62 65 72 5d 20 37 | 20 22 5c 0a 43 6f 6d 70 |umber] 7| "\.Comp|
|000011c0| 75 74 65 20 69 6e 64 65 | 78 20 6f 66 20 66 72 65 |ute inde|x of fre|
|000011d0| 65 20 73 71 75 61 72 65 | 20 77 69 74 68 20 68 69 |e square| with hi|
|000011e0| 67 68 65 73 74 20 73 63 | 6f 72 65 2c 20 6f 72 20 |ghest sc|ore, or |
|000011f0| 6e 69 6c 20 69 66 20 6e | 6f 6e 65 2e 22 5d 29 0a |nil if n|one."]).|
|00001200| 28 66 73 65 74 20 27 72 | 61 6e 64 6f 6d 2d 6e 75 |(fset 'r|andom-nu|
|00001210| 6d 62 65 72 20 23 5b 28 | 6e 29 20 22 c0 20 09 a6 |mber #[(|n) ". ..|
|00001220| 89 11 c2 57 ab 83 09 5b | 87 09 87 22 20 5b 72 61 |...W...[|..." [ra|
|00001230| 6e 64 6f 6d 20 6e 20 30 | 5d 20 33 20 22 5c 0a 52 |ndom n 0|] 3 "\.R|
|00001240| 65 74 75 72 6e 20 61 20 | 72 61 6e 64 6f 6d 20 69 |eturn a |random i|
|00001250| 6e 74 65 67 65 72 20 62 | 65 74 77 65 65 6e 20 30 |nteger b|etween 0|
|00001260| 20 61 6e 64 20 4e 2d 31 | 20 69 6e 63 6c 75 73 69 | and N-1| inclusi|
|00001270| 76 65 2e 22 5d 29 0a 28 | 64 65 66 76 61 72 20 67 |ve."]).(|defvar g|
|00001280| 6f 6d 6f 6b 75 2d 73 61 | 76 65 64 2d 73 63 6f 72 |omoku-sa|ved-scor|
|00001290| 65 2d 74 61 62 6c 65 20 | 6e 69 6c 20 22 5c 0a 52 |e-table |nil "\.R|
|000012a0| 65 63 6f 72 64 65 64 20 | 69 6e 69 74 69 61 6c 20 |ecorded |initial |
|000012b0| 76 61 6c 75 65 20 6f 66 | 20 70 72 65 76 69 6f 75 |value of| previou|
|000012c0| 73 20 73 63 6f 72 65 20 | 74 61 62 6c 65 2e 22 29 |s score |table.")|
|000012d0| 0a 28 64 65 66 76 61 72 | 20 67 6f 6d 6f 6b 75 2d |.(defvar| gomoku-|
|000012e0| 73 61 76 65 64 2d 62 6f | 61 72 64 2d 77 69 64 74 |saved-bo|ard-widt|
|000012f0| 68 20 6e 69 6c 20 22 5c | 0a 52 65 63 6f 72 64 65 |h nil "\|.Recorde|
|00001300| 64 20 76 61 6c 75 65 20 | 6f 66 20 70 72 65 76 69 |d value |of previ|
|00001310| 6f 75 73 20 62 6f 61 72 | 64 20 77 69 64 74 68 2e |ous boar|d width.|
|00001320| 22 29 0a 28 64 65 66 76 | 61 72 20 67 6f 6d 6f 6b |").(defv|ar gomok|
|00001330| 75 2d 73 61 76 65 64 2d | 62 6f 61 72 64 2d 68 65 |u-saved-|board-he|
|00001340| 69 67 68 74 20 6e 69 6c | 20 22 5c 0a 52 65 63 6f |ight nil| "\.Reco|
|00001350| 72 64 65 64 20 76 61 6c | 75 65 20 6f 66 20 70 72 |rded val|ue of pr|
|00001360| 65 76 69 6f 75 73 20 62 | 6f 61 72 64 20 68 65 69 |evious b|oard hei|
|00001370| 67 68 74 2e 22 29 0a 28 | 66 73 65 74 20 27 67 6f |ght.").(|fset 'go|
|00001380| 6d 6f 6b 75 2d 69 6e 69 | 74 2d 73 63 6f 72 65 2d |moku-ini|t-score-|
|00001390| 74 61 62 6c 65 20 23 5b | 6e 69 6c 20 22 08 ab 91 |table #[|nil "...|
|000013a0| 09 5c 6e 55 ab 8c 0b 0c | 55 ab 87 c5 08 21 89 16 |.\nU....|U....!..|
|000013b0| 06 87 c7 0e 08 0e 09 ca | 5f 5c 22 16 06 cb 89 89 |........|_\".....|
|000013c0| 89 89 89 1e 0c 1e 0d 1e | 0e 1e 0f 1e 10 1e 11 09 |........|........|
|000013d0| 54 d2 a5 16 0f 0b 54 d2 | a5 16 0e d3 0e 0f 5e 16 |T.....T.|......^.|
|000013e0| 0d d3 0e 0e 5e 16 0c d4 | 16 11 d4 0e 0d 58 ab a0 |....^...|.....X..|
|000013f0| d4 16 10 d4 0e 0e 58 ab | 8f d5 0e 11 0e 10 5c 22 |......X.|......\"|
|00001400| 88 0e 10 54 89 16 10 aa | 6c 0e 11 54 89 16 11 aa |...T....|l..T....|
|00001410| 5b 0e 11 0e 0f 58 ab a0 | d4 16 10 d4 0e 0c 58 ab |[....X..|......X.|
|00001420| 8f d5 0e 11 0e 10 5c 22 | 88 0e 10 54 89 16 10 aa |......\"|...T....|
|00001430| 6c 0e 11 54 89 16 11 aa | 5b 2e 06 c5 0e 06 21 10 |l..T....|[.....!.|
|00001440| 09 12 0b 89 14 87 22 20 | 5b 67 6f 6d 6f 6b 75 2d |......" |[gomoku-|
|00001450| 73 61 76 65 64 2d 73 63 | 6f 72 65 2d 74 61 62 6c |saved-sc|ore-tabl|
|00001460| 65 20 67 6f 6d 6f 6b 75 | 2d 62 6f 61 72 64 2d 77 |e gomoku|-board-w|
|00001470| 69 64 74 68 20 67 6f 6d | 6f 6b 75 2d 73 61 76 65 |idth gom|oku-save|
|00001480| 64 2d 62 6f 61 72 64 2d | 77 69 64 74 68 20 67 6f |d-board-|width go|
|00001490| 6d 6f 6b 75 2d 62 6f 61 | 72 64 2d 68 65 69 67 68 |moku-boa|rd-heigh|
|000014a0| 74 20 67 6f 6d 6f 6b 75 | 2d 73 61 76 65 64 2d 62 |t gomoku|-saved-b|
|000014b0| 6f 61 72 64 2d 68 65 69 | 67 68 74 20 63 6f 70 79 |oard-hei|ght copy|
|000014c0| 2d 73 65 71 75 65 6e 63 | 65 20 67 6f 6d 6f 6b 75 |-sequenc|e gomoku|
|000014d0| 2d 73 63 6f 72 65 2d 74 | 61 62 6c 65 20 6d 61 6b |-score-t|able mak|
|000014e0| 65 2d 76 65 63 74 6f 72 | 20 67 6f 6d 6f 6b 75 2d |e-vector| gomoku-|
|000014f0| 76 65 63 74 6f 72 2d 6c | 65 6e 67 74 68 20 6e 69 |vector-l|ength ni|
|00001500| 6c 2d 73 63 6f 72 65 20 | 32 30 20 6e 69 6c 20 6d |l-score |20 nil m|
|00001510| 61 78 6a 32 20 6d 61 78 | 69 32 20 6d 61 78 6a 20 |axj2 max|i2 maxj |
|00001520| 6d 61 78 69 20 6a 20 69 | 20 32 20 34 20 31 20 67 |maxi j i| 2 4 1 g|
|00001530| 6f 6d 6f 6b 75 2d 69 6e | 69 74 2d 73 71 75 61 72 |omoku-in|it-squar|
|00001540| 65 2d 73 63 6f 72 65 5d | 20 37 20 22 5c 0a 43 72 |e-score]| 7 "\.Cr|
|00001550| 65 61 74 65 20 74 68 65 | 20 73 63 6f 72 65 20 74 |eate the| score t|
|00001560| 61 62 6c 65 20 76 65 63 | 74 6f 72 20 61 6e 64 20 |able vec|tor and |
|00001570| 66 69 6c 6c 20 69 74 20 | 77 69 74 68 20 69 6e 69 |fill it |with ini|
|00001580| 74 69 61 6c 20 76 61 6c | 75 65 73 2e 22 5d 29 0a |tial val|ues."]).|
|00001590| 28 66 73 65 74 20 27 67 | 6f 6d 6f 6b 75 2d 6e 62 |(fset 'g|omoku-nb|
|000015a0| 2d 71 74 75 70 6c 65 73 | 20 23 5b 28 69 20 6a 29 |-qtuples| #[(i j)|
|000015b0| 20 22 c0 09 53 5e c0 5c | 6e 09 5a 5e c0 0b 53 5e | "..S^.\|n.Z^..S^|
|000015c0| c0 0c 0b 5a 5e 1d 1e 06 | 1e 07 89 1e 08 0e 07 5c |...Z^...|.......\|
|000015d0| 5c c9 5d ca 5e 0e 06 0d | 5c 5c c9 5d ca 5e 0e 08 |\.].^...|\\.].^..|
|000015e0| 0e 06 5e 0e 07 0d 5e 5c | 5c c9 5d ca 5e 0e 07 0e |..^...^\|\.].^...|
|000015f0| 06 5e 0e 08 0d 5e 5c 5c | c9 5d ca 5e cb 5c 5c 5c |.^...^\\|.].^.\\\|
|00001600| 5c 5c 5c 5c 5c 2c 87 22 | 20 5b 34 20 69 20 67 6f |\\\\\,."| [4 i go|
|00001610| 6d 6f 6b 75 2d 62 6f 61 | 72 64 2d 77 69 64 74 68 |moku-boa|rd-width|
|00001620| 20 6a 20 67 6f 6d 6f 6b | 75 2d 62 6f 61 72 64 2d | j gomok|u-board-|
|00001630| 68 65 69 67 68 74 20 64 | 6f 77 6e 20 75 70 20 72 |height d|own up r|
|00001640| 69 67 68 74 20 6c 65 66 | 74 20 33 20 38 20 2d 31 |ight lef|t 3 8 -1|
|00001650| 32 5d 20 37 20 22 5c 0a | 52 65 74 75 72 6e 20 74 |2] 7 "\.|Return t|
|00001660| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 71 74 75 |he numbe|r of qtu|
|00001670| 70 6c 65 73 20 63 6f 6e | 74 61 69 6e 69 6e 67 20 |ples con|taining |
|00001680| 73 71 75 61 72 65 20 49 | 2c 4a 2e 22 5d 29 0a 28 |square I|,J."]).(|
|00001690| 66 73 65 74 20 27 67 6f | 6d 6f 6b 75 2d 69 6e 69 |fset 'go|moku-ini|
|000016a0| 74 2d 73 71 75 61 72 65 | 2d 73 63 6f 72 65 20 23 |t-square|-score #|
|000016b0| 5b 28 69 20 6a 29 20 22 | 08 09 5a 54 5c 6e 0b 5a |[(i j) "|..ZT\n.Z|
|000016c0| 54 c4 09 0b 5c 22 0d c6 | 48 5f 1e 07 1e 08 1e 09 |T...\"..|H_......|
|000016d0| 0e 5c 6e cb 09 0b 5c 22 | 0e 07 49 88 0e 5c 6e cb |.\n...\"|..I..\n.|
|000016e0| 0e 09 0b 5c 22 0e 07 49 | 88 0e 5c 6e cb 09 0e 08 |...\"..I|..\n....|
|000016f0| 5c 22 0e 07 49 88 0e 5c | 6e cb 0e 09 0e 08 5c 22 |\"..I..\|n.....\"|
|00001700| 0e 07 49 2b 87 22 20 5b | 67 6f 6d 6f 6b 75 2d 62 |..I+." [|gomoku-b|
|00001710| 6f 61 72 64 2d 77 69 64 | 74 68 20 69 20 67 6f 6d |oard-wid|th i gom|
|00001720| 6f 6b 75 2d 62 6f 61 72 | 64 2d 68 65 69 67 68 74 |oku-boar|d-height|
|00001730| 20 6a 20 67 6f 6d 6f 6b | 75 2d 6e 62 2d 71 74 75 | j gomok|u-nb-qtu|
|00001740| 70 6c 65 73 20 67 6f 6d | 6f 6b 75 2d 73 63 6f 72 |ples gom|oku-scor|
|00001750| 65 2d 74 72 61 6e 73 2d | 74 61 62 6c 65 20 30 20 |e-trans-|table 0 |
|00001760| 73 63 20 6a 6a 20 69 69 | 20 67 6f 6d 6f 6b 75 2d |sc jj ii| gomoku-|
|00001770| 73 63 6f 72 65 2d 74 61 | 62 6c 65 20 67 6f 6d 6f |score-ta|ble gomo|
|00001780| 6b 75 2d 78 79 2d 74 6f | 2d 69 6e 64 65 78 5d 20 |ku-xy-to|-index] |
|00001790| 35 20 22 5c 0a 47 69 76 | 65 20 69 6e 69 74 69 61 |5 "\.Giv|e initia|
|000017a0| 6c 20 73 63 6f 72 65 20 | 74 6f 20 73 71 75 61 72 |l score |to squar|
|000017b0| 65 20 49 2c 4a 20 61 6e | 64 20 74 6f 20 69 74 73 |e I,J an|d to its|
|000017c0| 20 6d 69 72 72 6f 72 20 | 69 6d 61 67 65 73 2e 22 | mirror |images."|
|000017d0| 5d 29 0a 28 66 73 65 74 | 20 27 67 6f 6d 6f 6b 75 |]).(fset| 'gomoku|
|000017e0| 2d 75 70 64 61 74 65 2d | 73 63 6f 72 65 2d 74 61 |-update-|score-ta|
|000017f0| 62 6c 65 20 23 5b 28 73 | 71 75 61 72 65 20 64 76 |ble #[(s|quare dv|
|00001800| 61 6c 29 20 22 c0 09 21 | 1a c3 09 21 1c c5 c6 5c |al) "..!|...!...\|
|00001810| 6e 5a 5d 1e 07 c5 c6 0c | 5a 5d 1e 08 c9 0e 5c 6e |nZ].....|Z]....\n|
|00001820| 5c 6e 5a cb 5a 5e 1e 0c | c9 0e 0d 0c 5a cb 5a 5e |\nZ.Z^..|....Z.Z^|
|00001830| 1e 0e cf 0e 07 0e 0c 09 | c6 c9 0e 10 26 06 88 cf |........|....&...|
|00001840| 0e 08 0e 0e 09 c9 c6 0e | 10 26 06 88 cf 0e 07 0e |........|.&......|
|00001850| 08 5d 0e 0c 0e 0e 5e 09 | c6 89 0e 10 26 06 88 cf |.]....^.|....&...|
|00001860| c6 0c 5a c5 5c 6e 0e 5c | 6e 5a 5d 5d c9 5c 6e d1 |..Z.\n.\|nZ]].\n.|
|00001870| 5a 0e 0d 0c 5a cb 5a 5e | 5e 09 d2 c6 0e 10 26 06 |Z...Z.Z^|^.....&.|
|00001880| 2e 06 87 22 20 5b 67 6f | 6d 6f 6b 75 2d 69 6e 64 |..." [go|moku-ind|
|00001890| 65 78 2d 74 6f 2d 78 20 | 73 71 75 61 72 65 20 78 |ex-to-x |square x|
|000018a0| 20 67 6f 6d 6f 6b 75 2d | 69 6e 64 65 78 2d 74 6f | gomoku-|index-to|
|000018b0| 2d 79 20 79 20 2d 34 20 | 31 20 69 6d 69 6e 20 6a |-y y -4 |1 imin j|
|000018c0| 6d 69 6e 20 30 20 67 6f | 6d 6f 6b 75 2d 62 6f 61 |min 0 go|moku-boa|
|000018d0| 72 64 2d 77 69 64 74 68 | 20 34 20 69 6d 61 78 20 |rd-width| 4 imax |
|000018e0| 67 6f 6d 6f 6b 75 2d 62 | 6f 61 72 64 2d 68 65 69 |gomoku-b|oard-hei|
|000018f0| 67 68 74 20 6a 6d 61 78 | 20 67 6f 6d 6f 6b 75 2d |ght jmax| gomoku-|
|00001900| 75 70 64 61 74 65 2d 73 | 63 6f 72 65 2d 69 6e 2d |update-s|core-in-|
|00001910| 64 69 72 65 63 74 69 6f | 6e 20 64 76 61 6c 20 35 |directio|n dval 5|
|00001920| 20 2d 31 5d 20 37 20 22 | 5c 0a 55 70 64 61 74 65 | -1] 7 "|\.Update|
|00001930| 20 73 63 6f 72 65 20 74 | 61 62 6c 65 20 61 66 74 | score t|able aft|
|00001940| 65 72 20 53 51 55 41 52 | 45 20 72 65 63 65 69 76 |er SQUAR|E receiv|
|00001950| 65 64 20 61 20 44 56 41 | 4c 20 69 6e 63 72 65 6d |ed a DVA|L increm|
|00001960| 65 6e 74 2e 22 5d 29 0a | 28 66 73 65 74 20 27 67 |ent."]).|(fset 'g|
|00001970| 6f 6d 6f 6b 75 2d 75 70 | 64 61 74 65 2d 73 63 6f |omoku-up|date-sco|
|00001980| 72 65 2d 69 6e 2d 64 69 | 72 65 63 74 69 6f 6e 20 |re-in-di|rection |
|00001990| 23 5b 28 6c 65 66 74 20 | 72 69 67 68 74 20 73 71 |#[(left |right sq|
|000019a0| 75 61 72 65 20 64 78 20 | 64 79 20 64 76 61 6c 29 |uare dx |dy dval)|
|000019b0| 20 22 08 09 56 86 b6 00 | c2 89 89 89 89 89 1b 1c | "..V...|........|
|000019c0| 1d 1e 06 1e 07 1e 08 c9 | 0e 5c 6e 0e 0b 5c 22 16 |........|.\n..\".|
|000019d0| 08 0e 0c 08 0e 08 5f 5c | 5c 16 07 0e 0c 09 0e 08 |......_\|\.......|
|000019e0| 5f 5c 5c 16 06 0e 07 0e | 08 cd 5f 5c 5c 15 0e 07 |_\\.....|.._\\...|
|000019f0| 16 0c ce 14 0e 0c 0d 58 | ab 92 0c 0e 0f 0e 0c 48 |.......X|.......H|
|00001a00| 5c 5c 14 0e 0c 0e 08 5c | 5c 89 16 0c aa 6a 0e 07 |\\.....\|\....j..|
|00001a10| 0e 06 58 ad d8 0e 10 0c | 48 0e 10 0c 0e 11 5a 48 |..X.....|H.....ZH|
|00001a20| 5a 89 13 ce 55 ac a9 0e | 07 89 16 0c 0d 58 ab a0 |Z...U...|.....X..|
|00001a30| 0e 0f 0e 0c 48 ce 55 ab | 8d 0e 12 0e 0c 0e 12 0e |....H.U.|........|
|00001a40| 0c 48 0b 5c 5c 49 88 0e | 0c 0e 08 5c 5c 89 16 0c |.H.\\I..|...\\...|
|00001a50| aa 5c 5c 0d 0e 08 5c 5c | 15 0c 0e 0f 0e 07 48 5b |.\\...\\|......H[|
|00001a60| 0e 0f 0d 48 5c 5c 5c 5c | 14 0e 07 0e 08 5c 5c 89 |...H\\\\|.....\\.|
|00001a70| 16 07 aa 23 2e 06 87 22 | 20 5b 6c 65 66 74 20 72 |...#..."| [left r|
|00001a80| 69 67 68 74 20 6e 69 6c | 20 64 65 6c 74 61 20 63 |ight nil| delta c|
|00001a90| 6f 75 6e 74 20 73 71 75 | 61 72 65 32 20 73 71 75 |ount squ|are2 squ|
|00001aa0| 61 72 65 31 20 73 71 75 | 61 72 65 30 20 64 65 70 |are1 squ|are0 dep|
|00001ab0| 6c 20 67 6f 6d 6f 6b 75 | 2d 78 79 2d 74 6f 2d 69 |l gomoku|-xy-to-i|
|00001ac0| 6e 64 65 78 20 64 78 20 | 64 79 20 73 71 75 61 72 |ndex dx |dy squar|
|00001ad0| 65 20 34 20 30 20 67 6f | 6d 6f 6b 75 2d 62 6f 61 |e 4 0 go|moku-boa|
|00001ae0| 72 64 20 67 6f 6d 6f 6b | 75 2d 73 63 6f 72 65 2d |rd gomok|u-score-|
|00001af0| 74 72 61 6e 73 2d 74 61 | 62 6c 65 20 64 76 61 6c |trans-ta|ble dval|
|00001b00| 20 67 6f 6d 6f 6b 75 2d | 73 63 6f 72 65 2d 74 61 | gomoku-|score-ta|
|00001b10| 62 6c 65 5d 20 37 20 22 | 5c 0a 55 70 64 61 74 65 |ble] 7 "|\.Update|
|00001b20| 20 73 63 6f 72 65 73 20 | 66 6f 72 20 61 6c 6c 20 | scores |for all |
|00001b30| 73 71 75 61 72 65 73 20 | 69 6e 20 74 68 65 20 71 |squares |in the q|
|00001b40| 74 75 70 6c 65 73 20 73 | 74 61 72 74 69 6e 67 20 |tuples s|tarting |
|00001b50| 62 65 74 77 65 65 6e 20 | 74 68 65 20 4c 45 46 54 |between |the LEFT|
|00001b60| 74 68 0a 73 71 75 61 72 | 65 20 61 6e 64 20 74 68 |th.squar|e and th|
|00001b70| 65 20 52 49 47 48 54 74 | 68 20 61 66 74 65 72 20 |e RIGHTt|h after |
|00001b80| 53 51 55 41 52 45 2c 20 | 61 6c 6f 6e 67 20 74 68 |SQUARE, |along th|
|00001b90| 65 20 44 58 2c 20 44 59 | 20 64 69 72 65 63 74 69 |e DX, DY| directi|
|00001ba0| 6f 6e 2c 20 63 6f 6e 73 | 69 64 65 72 69 6e 67 0a |on, cons|idering.|
|00001bb0| 74 68 61 74 20 44 56 41 | 4c 20 68 61 73 20 62 65 |that DVA|L has be|
|00001bc0| 65 6e 20 61 64 64 65 64 | 20 6f 6e 20 53 51 55 41 |en added| on SQUA|
|00001bd0| 52 45 2e 22 5d 29 0a 28 | 64 65 66 76 61 72 20 67 |RE."]).(|defvar g|
|00001be0| 6f 6d 6f 6b 75 2d 67 61 | 6d 65 2d 69 6e 2d 70 72 |omoku-ga|me-in-pr|
|00001bf0| 6f 67 72 65 73 73 20 6e | 69 6c 20 22 5c 0a 4e 6f |ogress n|il "\.No|
|00001c00| 6e 2d 6e 69 6c 20 69 66 | 20 61 20 67 61 6d 65 20 |n-nil if| a game |
|00001c10| 69 73 20 69 6e 20 70 72 | 6f 67 72 65 73 73 2e 22 |is in pr|ogress."|
|00001c20| 29 0a 28 64 65 66 76 61 | 72 20 67 6f 6d 6f 6b 75 |).(defva|r gomoku|
|00001c30| 2d 67 61 6d 65 2d 68 69 | 73 74 6f 72 79 20 6e 69 |-game-hi|story ni|
|00001c40| 6c 20 22 5c 0a 41 20 72 | 65 63 6f 72 64 20 6f 66 |l "\.A r|ecord of|
|00001c50| 20 61 6c 6c 20 6d 6f 76 | 65 73 20 74 68 61 74 20 | all mov|es that |
|00001c60| 68 61 76 65 20 62 65 65 | 6e 20 70 6c 61 79 65 64 |have bee|n played|
|00001c70| 20 64 75 72 69 6e 67 20 | 63 75 72 72 65 6e 74 20 | during |current |
|00001c80| 67 61 6d 65 2e 22 29 0a | 28 64 65 66 76 61 72 20 |game.").|(defvar |
|00001c90| 67 6f 6d 6f 6b 75 2d 6e | 75 6d 62 65 72 2d 6f 66 |gomoku-n|umber-of|
|00001ca0| 2d 6d 6f 76 65 73 20 6e | 69 6c 20 22 5c 0a 4e 75 |-moves n|il "\.Nu|
|00001cb0| 6d 62 65 72 20 6f 66 20 | 6d 6f 76 65 73 20 61 6c |mber of |moves al|
|00001cc0| 72 65 61 64 79 20 70 6c | 61 79 65 64 20 69 6e 20 |ready pl|ayed in |
|00001cd0| 63 75 72 72 65 6e 74 20 | 67 61 6d 65 2e 22 29 0a |current |game.").|
|00001ce0| 28 64 65 66 76 61 72 20 | 67 6f 6d 6f 6b 75 2d 6e |(defvar |gomoku-n|
|00001cf0| 75 6d 62 65 72 2d 6f 66 | 2d 68 75 6d 61 6e 2d 6d |umber-of|-human-m|
|00001d00| 6f 76 65 73 20 6e 69 6c | 20 22 5c 0a 4e 75 6d 62 |oves nil| "\.Numb|
|00001d10| 65 72 20 6f 66 20 6d 6f | 76 65 73 20 61 6c 72 65 |er of mo|ves alre|
|00001d20| 61 64 79 20 70 6c 61 79 | 65 64 20 62 79 20 68 75 |ady play|ed by hu|
|00001d30| 6d 61 6e 20 69 6e 20 63 | 75 72 72 65 6e 74 20 67 |man in c|urrent g|
|00001d40| 61 6d 65 2e 22 29 0a 28 | 64 65 66 76 61 72 20 67 |ame.").(|defvar g|
|00001d50| 6f 6d 6f 6b 75 2d 65 6d | 61 63 73 2d 70 6c 61 79 |omoku-em|acs-play|
|00001d60| 65 64 2d 66 69 72 73 74 | 20 6e 69 6c 20 22 5c 0a |ed-first| nil "\.|
|00001d70| 4e 6f 6e 2d 6e 69 6c 20 | 69 66 20 45 6d 61 63 73 |Non-nil |if Emacs|
|00001d80| 20 70 6c 61 79 65 64 20 | 66 69 72 73 74 2e 22 29 | played |first.")|
|00001d90| 0a 28 64 65 66 76 61 72 | 20 67 6f 6d 6f 6b 75 2d |.(defvar| gomoku-|
|00001da0| 68 75 6d 61 6e 2d 74 6f | 6f 6b 2d 62 61 63 6b 20 |human-to|ok-back |
|00001db0| 6e 69 6c 20 22 5c 0a 4e | 6f 6e 2d 6e 69 6c 20 69 |nil "\.N|on-nil i|
|00001dc0| 66 20 48 75 6d 61 6e 20 | 74 6f 6f 6b 20 62 61 63 |f Human |took bac|
|00001dd0| 6b 20 61 20 6d 6f 76 65 | 20 64 75 72 69 6e 67 20 |k a move| during |
|00001de0| 74 68 65 20 67 61 6d 65 | 2e 22 29 0a 28 64 65 66 |the game|.").(def|
|00001df0| 76 61 72 20 67 6f 6d 6f | 6b 75 2d 68 75 6d 61 6e |var gomo|ku-human|
|00001e00| 2d 72 65 66 75 73 65 64 | 2d 64 72 61 77 20 6e 69 |-refused|-draw ni|
|00001e10| 6c 20 22 5c 0a 4e 6f 6e | 2d 6e 69 6c 20 69 66 20 |l "\.Non|-nil if |
|00001e20| 48 75 6d 61 6e 20 72 65 | 66 75 73 65 64 20 45 6d |Human re|fused Em|
|00001e30| 61 63 73 20 6f 66 66 65 | 72 20 6f 66 20 61 20 64 |acs offe|r of a d|
|00001e40| 72 61 77 2e 22 29 0a 28 | 64 65 66 76 61 72 20 67 |raw.").(|defvar g|
|00001e50| 6f 6d 6f 6b 75 2d 65 6d | 61 63 73 2d 69 73 2d 63 |omoku-em|acs-is-c|
|00001e60| 6f 6d 70 75 74 69 6e 67 | 20 6e 69 6c 20 22 5c 0a |omputing| nil "\.|
|00001e70| 4e 6f 6e 2d 6e 69 6c 20 | 69 66 20 45 6d 61 63 73 |Non-nil |if Emacs|
|00001e80| 20 69 73 20 69 6e 20 74 | 68 65 20 6d 69 64 64 6c | is in t|he middl|
|00001e90| 65 20 6f 66 20 61 20 63 | 6f 6d 70 75 74 61 74 69 |e of a c|omputati|
|00001ea0| 6f 6e 2e 22 29 0a 28 66 | 73 65 74 20 27 67 6f 6d |on.").(f|set 'gom|
|00001eb0| 6f 6b 75 2d 73 74 61 72 | 74 2d 67 61 6d 65 20 23 |oku-star|t-game #|
|00001ec0| 5b 28 6e 20 6d 29 20 22 | c0 11 c0 12 0b 14 0d 16 |[(n m) "|........|
|00001ed0| 06 0d c7 5c 5c 0b 54 5f | 54 16 08 0b 0d c9 5f 5f |...\\.T_|T.....__|
|00001ee0| ca a5 16 0b cc 16 0d ce | 16 0f ce 16 10 cc 16 11 |........|........|
|00001ef0| cc 16 12 cc 16 13 d4 0b | 0d 5c 22 88 d5 20 88 d6 |........|.\".. ..|
|00001f00| 20 88 cc 89 11 87 22 20 | 5b 74 20 67 6f 6d 6f 6b | ....." |[t gomok|
|00001f10| 75 2d 65 6d 61 63 73 2d | 69 73 2d 63 6f 6d 70 75 |u-emacs-|is-compu|
|00001f20| 74 69 6e 67 20 67 6f 6d | 6f 6b 75 2d 67 61 6d 65 |ting gom|oku-game|
|00001f30| 2d 69 6e 2d 70 72 6f 67 | 72 65 73 73 20 6e 20 67 |-in-prog|ress n g|
|00001f40| 6f 6d 6f 6b 75 2d 62 6f | 61 72 64 2d 77 69 64 74 |omoku-bo|ard-widt|
|00001f50| 68 20 6d 20 67 6f 6d 6f | 6b 75 2d 62 6f 61 72 64 |h m gomo|ku-board|
|00001f60| 2d 68 65 69 67 68 74 20 | 32 20 67 6f 6d 6f 6b 75 |-height |2 gomoku|
|00001f70| 2d 76 65 63 74 6f 72 2d | 6c 65 6e 67 74 68 20 37 |-vector-|length 7|
|00001f80| 20 31 30 20 67 6f 6d 6f | 6b 75 2d 64 72 61 77 2d | 10 gomo|ku-draw-|
|00001f90| 6c 69 6d 69 74 20 6e 69 | 6c 20 67 6f 6d 6f 6b 75 |limit ni|l gomoku|
|00001fa0| 2d 67 61 6d 65 2d 68 69 | 73 74 6f 72 79 20 30 20 |-game-hi|story 0 |
|00001fb0| 67 6f 6d 6f 6b 75 2d 6e | 75 6d 62 65 72 2d 6f 66 |gomoku-n|umber-of|
|00001fc0| 2d 6d 6f 76 65 73 20 67 | 6f 6d 6f 6b 75 2d 6e 75 |-moves g|omoku-nu|
|00001fd0| 6d 62 65 72 2d 6f 66 2d | 68 75 6d 61 6e 2d 6d 6f |mber-of-|human-mo|
|00001fe0| 76 65 73 20 67 6f 6d 6f | 6b 75 2d 65 6d 61 63 73 |ves gomo|ku-emacs|
|00001ff0| 2d 70 6c 61 79 65 64 2d | 66 69 72 73 74 20 67 6f |-played-|first go|
|00002000| 6d 6f 6b 75 2d 68 75 6d | 61 6e 2d 74 6f 6f 6b 2d |moku-hum|an-took-|
|00002010| 62 61 63 6b 20 67 6f 6d | 6f 6b 75 2d 68 75 6d 61 |back gom|oku-huma|
|00002020| 6e 2d 72 65 66 75 73 65 | 64 2d 64 72 61 77 20 67 |n-refuse|d-draw g|
|00002030| 6f 6d 6f 6b 75 2d 69 6e | 69 74 2d 64 69 73 70 6c |omoku-in|it-displ|
|00002040| 61 79 20 67 6f 6d 6f 6b | 75 2d 69 6e 69 74 2d 73 |ay gomok|u-init-s|
|00002050| 63 6f 72 65 2d 74 61 62 | 6c 65 20 67 6f 6d 6f 6b |core-tab|le gomok|
|00002060| 75 2d 69 6e 69 74 2d 62 | 6f 61 72 64 5d 20 33 20 |u-init-b|oard] 3 |
|00002070| 22 5c 0a 49 6e 69 74 69 | 61 6c 69 7a 65 20 61 20 |"\.Initi|alize a |
|00002080| 6e 65 77 20 67 61 6d 65 | 20 6f 6e 20 61 6e 20 4e |new game| on an N|
|00002090| 20 62 79 20 4d 20 62 6f | 61 72 64 2e 22 5d 29 0a | by M bo|ard."]).|
|000020a0| 28 66 73 65 74 20 27 67 | 6f 6d 6f 6b 75 2d 70 6c |(fset 'g|omoku-pl|
|000020b0| 61 79 2d 6d 6f 76 65 20 | 23 5b 28 73 71 75 61 72 |ay-move |#[(squar|
|000020c0| 65 20 76 61 6c 20 26 6f | 70 74 69 6f 6e 61 6c 20 |e val &o|ptional |
|000020d0| 64 6f 6e 74 2d 75 70 64 | 61 74 65 2d 73 63 6f 72 |dont-upd|ate-scor|
|000020e0| 65 29 20 22 c0 11 5c 6e | c3 55 ab 85 0c 54 14 aa |e) "..\n|.U...T..|
|000020f0| 88 0d c6 55 ab 83 c0 16 | 07 0e 08 0e 09 0e 08 48 |...U....|.......H|
|00002100| 42 0e 5c 6e 42 16 5c 6e | 0d 54 15 cb 0e 08 5c 6e |B.\nB.\n|.T....\n|
|00002110| 5c 22 88 0e 0c 0e 08 5c | 6e 49 88 0e 0d ac 8d ce |\".....\|nI......|
|00002120| 0e 08 5c 6e 5c 22 88 0e | 09 0e 08 cf 49 88 d0 89 |..\n\"..|....I...|
|00002130| 11 87 22 20 5b 74 20 67 | 6f 6d 6f 6b 75 2d 65 6d |.." [t g|omoku-em|
|00002140| 61 63 73 2d 69 73 2d 63 | 6f 6d 70 75 74 69 6e 67 |acs-is-c|omputing|
|00002150| 20 76 61 6c 20 31 20 67 | 6f 6d 6f 6b 75 2d 6e 75 | val 1 g|omoku-nu|
|00002160| 6d 62 65 72 2d 6f 66 2d | 68 75 6d 61 6e 2d 6d 6f |mber-of-|human-mo|
|00002170| 76 65 73 20 67 6f 6d 6f | 6b 75 2d 6e 75 6d 62 65 |ves gomo|ku-numbe|
|00002180| 72 2d 6f 66 2d 6d 6f 76 | 65 73 20 30 20 67 6f 6d |r-of-mov|es 0 gom|
|00002190| 6f 6b 75 2d 65 6d 61 63 | 73 2d 70 6c 61 79 65 64 |oku-emac|s-played|
|000021a0| 2d 66 69 72 73 74 20 73 | 71 75 61 72 65 20 67 6f |-first s|quare go|
|000021b0| 6d 6f 6b 75 2d 73 63 6f | 72 65 2d 74 61 62 6c 65 |moku-sco|re-table|
|000021c0| 20 67 6f 6d 6f 6b 75 2d | 67 61 6d 65 2d 68 69 73 | gomoku-|game-his|
|000021d0| 74 6f 72 79 20 67 6f 6d | 6f 6b 75 2d 70 6c 6f 74 |tory gom|oku-plot|
|000021e0| 2d 73 71 75 61 72 65 20 | 67 6f 6d 6f 6b 75 2d 62 |-square |gomoku-b|
|000021f0| 6f 61 72 64 20 64 6f 6e | 74 2d 75 70 64 61 74 65 |oard don|t-update|
|00002200| 2d 73 63 6f 72 65 20 67 | 6f 6d 6f 6b 75 2d 75 70 |-score g|omoku-up|
|00002210| 64 61 74 65 2d 73 63 6f | 72 65 2d 74 61 62 6c 65 |date-sco|re-table|
|00002220| 20 2d 31 20 6e 69 6c 5d | 20 33 20 22 5c 0a 47 6f | -1 nil]| 3 "\.Go|
|00002230| 20 74 6f 20 53 51 55 41 | 52 45 2c 20 70 6c 61 79 | to SQUA|RE, play|
|00002240| 20 56 41 4c 20 61 6e 64 | 20 75 70 64 61 74 65 20 | VAL and| update |
|00002250| 65 76 65 72 79 74 68 69 | 6e 67 2e 22 5d 29 0a 28 |everythi|ng."]).(|
|00002260| 66 73 65 74 20 27 67 6f | 6d 6f 6b 75 2d 74 61 6b |fset 'go|moku-tak|
|00002270| 65 2d 62 61 63 6b 20 23 | 5b 6e 69 6c 20 22 c0 11 |e-back #|[nil "..|
|00002280| 5c 6e 40 89 1b 40 1c 0d | 0c 48 89 1e 06 c7 55 ab |\n@..@..|.H....U.|
|00002290| 85 0e 08 53 16 08 5c 6e | 41 12 0e 09 53 16 09 ca |...S..\n|A...S...|
|000022a0| 0c cb 5c 22 88 0d 0c cb | 49 88 cc 0c 0e 06 5b 5c |..\"....|I.....[\|
|000022b0| 22 88 0e 0d 0c 0b 41 49 | 88 2b ce 89 11 87 22 20 |".....AI|.+...." |
|000022c0| 5b 74 20 67 6f 6d 6f 6b | 75 2d 65 6d 61 63 73 2d |[t gomok|u-emacs-|
|000022d0| 69 73 2d 63 6f 6d 70 75 | 74 69 6e 67 20 67 6f 6d |is-compu|ting gom|
|000022e0| 6f 6b 75 2d 67 61 6d 65 | 2d 68 69 73 74 6f 72 79 |oku-game|-history|
|000022f0| 20 6c 61 73 74 2d 6d 6f | 76 65 20 73 71 75 61 72 | last-mo|ve squar|
|00002300| 65 20 67 6f 6d 6f 6b 75 | 2d 62 6f 61 72 64 20 6f |e gomoku|-board o|
|00002310| 6c 64 76 61 6c 20 31 20 | 67 6f 6d 6f 6b 75 2d 6e |ldval 1 |gomoku-n|
|00002320| 75 6d 62 65 72 2d 6f 66 | 2d 68 75 6d 61 6e 2d 6d |umber-of|-human-m|
|00002330| 6f 76 65 73 20 67 6f 6d | 6f 6b 75 2d 6e 75 6d 62 |oves gom|oku-numb|
|00002340| 65 72 2d 6f 66 2d 6d 6f | 76 65 73 20 67 6f 6d 6f |er-of-mo|ves gomo|
|00002350| 6b 75 2d 70 6c 6f 74 2d | 73 71 75 61 72 65 20 30 |ku-plot-|square 0|
|00002360| 20 67 6f 6d 6f 6b 75 2d | 75 70 64 61 74 65 2d 73 | gomoku-|update-s|
|00002370| 63 6f 72 65 2d 74 61 62 | 6c 65 20 67 6f 6d 6f 6b |core-tab|le gomok|
|00002380| 75 2d 73 63 6f 72 65 2d | 74 61 62 6c 65 20 6e 69 |u-score-|table ni|
|00002390| 6c 5d 20 34 20 22 5c 0a | 54 61 6b 65 20 62 61 63 |l] 4 "\.|Take bac|
|000023a0| 6b 20 6c 61 73 74 20 6d | 6f 76 65 20 61 6e 64 20 |k last m|ove and |
|000023b0| 75 70 64 61 74 65 20 65 | 76 65 72 79 74 68 69 6e |update e|verythin|
|000023c0| 67 2e 22 5d 29 0a 28 64 | 65 66 76 61 72 20 67 6f |g."]).(d|efvar go|
|000023d0| 6d 6f 6b 75 2d 6e 75 6d | 62 65 72 2d 6f 66 2d 77 |moku-num|ber-of-w|
|000023e0| 69 6e 73 20 30 20 22 5c | 0a 4e 75 6d 62 65 72 20 |ins 0 "\|.Number |
|000023f0| 6f 66 20 67 61 6d 65 73 | 20 61 6c 72 65 61 64 79 |of games| already|
|00002400| 20 77 6f 6e 20 69 6e 20 | 74 68 69 73 20 73 65 73 | won in |this ses|
|00002410| 73 69 6f 6e 2e 22 29 0a | 28 64 65 66 76 61 72 20 |sion.").|(defvar |
|00002420| 67 6f 6d 6f 6b 75 2d 6e | 75 6d 62 65 72 2d 6f 66 |gomoku-n|umber-of|
|00002430| 2d 6c 6f 73 73 65 73 20 | 30 20 22 5c 0a 4e 75 6d |-losses |0 "\.Num|
|00002440| 62 65 72 20 6f 66 20 67 | 61 6d 65 73 20 61 6c 72 |ber of g|ames alr|
|00002450| 65 61 64 79 20 6c 6f 73 | 74 20 69 6e 20 74 68 69 |eady los|t in thi|
|00002460| 73 20 73 65 73 73 69 6f | 6e 2e 22 29 0a 28 64 65 |s sessio|n.").(de|
|00002470| 66 76 61 72 20 67 6f 6d | 6f 6b 75 2d 6e 75 6d 62 |fvar gom|oku-numb|
|00002480| 65 72 2d 6f 66 2d 64 72 | 61 77 73 20 30 20 22 5c |er-of-dr|aws 0 "\|
|00002490| 0a 4e 75 6d 62 65 72 20 | 6f 66 20 67 61 6d 65 73 |.Number |of games|
|000024a0| 20 61 6c 72 65 61 64 79 | 20 64 72 61 77 6e 20 69 | already| drawn i|
|000024b0| 6e 20 74 68 69 73 20 73 | 65 73 73 69 6f 6e 2e 22 |n this s|ession."|
|000024c0| 29 0a 28 66 73 65 74 20 | 27 67 6f 6d 6f 6b 75 2d |).(fset |'gomoku-|
|000024d0| 74 65 72 6d 69 6e 61 74 | 65 2d 67 61 6d 65 20 23 |terminat|e-game #|
|000024e0| 5b 28 72 65 73 75 6c 74 | 29 20 22 c0 19 5c 6e c3 |[(result|) "..\n.|
|000024f0| 3d ab b8 0c 54 14 0d c6 | 57 ab 83 c7 aa aa 0e 08 |=...T...|W.......|
|00002500| ab 83 c9 aa a3 0e 5c 6e | ab 83 cb aa 9c 0e 0c ac |......\n|........|
|00002510| 83 cd aa 95 0e 0e cf 55 | ab 8e 0e 10 cf 55 ab 88 |.......U|.....U..|
|00002520| 0c d1 56 ab 83 d2 aa 81 | d3 11 aa e7 5c 6e d4 3d |..V.....|....\n.=|
|00002530| ab 97 0e 0e 54 16 0e 0e | 5c 6e ab 83 d5 aa 88 0e |....T...|\n......|
|00002540| 0c ab 83 d6 aa 81 d7 11 | aa cb 5c 6e d8 3d ab 87 |........|..\n.=..|
|00002550| 0c 54 14 d9 11 aa bf 5c | 6e da 3d ab 97 0e 10 54 |.T.....\|n.=....T|
|00002560| 16 10 0e 5c 6e ab 83 db | aa 88 0e 0c ab 83 dc aa |...\n...|........|
|00002570| 81 dd 11 aa a3 5c 6e de | 3d ab 97 0e 10 54 16 10 |.....\n.|=....T..|
|00002580| 0e 5c 6e ab 83 df aa 88 | 0e 0c ab 83 e0 aa 81 e1 |.\n.....|........|
|00002590| 11 aa 87 5c 6e e2 3d ab | 82 e3 11 e4 20 88 09 ab |...\n.=.|.... ...|
|000025a0| 84 c1 09 21 88 e5 20 88 | c0 89 16 26 29 87 22 20 |...!.. .|...&)." |
|000025b0| 5b 6e 69 6c 20 6d 65 73 | 73 61 67 65 20 72 65 73 |[nil mes|sage res|
|000025c0| 75 6c 74 20 65 6d 61 63 | 73 2d 77 6f 6e 20 67 6f |ult emac|s-won go|
|000025d0| 6d 6f 6b 75 2d 6e 75 6d | 62 65 72 2d 6f 66 2d 77 |moku-num|ber-of-w|
|000025e0| 69 6e 73 20 67 6f 6d 6f | 6b 75 2d 6e 75 6d 62 65 |ins gomo|ku-numbe|
|000025f0| 72 2d 6f 66 2d 6d 6f 76 | 65 73 20 32 30 20 22 54 |r-of-mov|es 20 "T|
|00002600| 68 69 73 20 77 61 73 20 | 61 20 52 45 41 4c 4c 59 |his was |a REALLY|
|00002610| 20 51 55 49 43 4b 20 77 | 69 6e 2e 22 20 67 6f 6d | QUICK w|in." gom|
|00002620| 6f 6b 75 2d 68 75 6d 61 | 6e 2d 72 65 66 75 73 65 |oku-huma|n-refuse|
|00002630| 64 2d 64 72 61 77 20 22 | 49 20 77 6f 6e 2e 2e 2e |d-draw "|I won...|
|00002640| 20 54 6f 6f 20 62 61 64 | 20 79 6f 75 20 72 65 66 | Too bad| you ref|
|00002650| 75 73 65 64 20 6d 79 20 | 6f 66 66 65 72 20 6f 66 |used my |offer of|
|00002660| 20 61 20 64 72 61 77 20 | 21 22 20 67 6f 6d 6f 6b | a draw |!" gomok|
|00002670| 75 2d 68 75 6d 61 6e 2d | 74 6f 6f 6b 2d 62 61 63 |u-human-|took-bac|
|00002680| 6b 20 22 49 20 77 6f 6e | 2e 2e 2e 20 54 61 6b 69 |k "I won|... Taki|
|00002690| 6e 67 20 6d 6f 76 65 73 | 20 62 61 63 6b 20 77 69 |ng moves| back wi|
|000026a0| 6c 6c 20 6e 6f 74 20 68 | 65 6c 70 20 79 6f 75 20 |ll not h|elp you |
|000026b0| 21 22 20 67 6f 6d 6f 6b | 75 2d 65 6d 61 63 73 2d |!" gomok|u-emacs-|
|000026c0| 70 6c 61 79 65 64 2d 66 | 69 72 73 74 20 22 49 20 |played-f|irst "I |
|000026d0| 77 6f 6e 2e 2e 2e 20 50 | 6c 61 79 69 6e 67 20 66 |won... P|laying f|
|000026e0| 69 72 73 74 20 64 69 64 | 20 6e 6f 74 20 68 65 6c |irst did| not hel|
|000026f0| 70 20 79 6f 75 20 6d 75 | 63 68 20 21 22 20 67 6f |p you mu|ch !" go|
|00002700| 6d 6f 6b 75 2d 6e 75 6d | 62 65 72 2d 6f 66 2d 6c |moku-num|ber-of-l|
|00002710| 6f 73 73 65 73 20 30 20 | 67 6f 6d 6f 6b 75 2d 6e |osses 0 |gomoku-n|
|00002720| 75 6d 62 65 72 2d 6f 66 | 2d 64 72 61 77 73 20 31 |umber-of|-draws 1|
|00002730| 20 22 49 27 6d 20 62 65 | 63 6f 6d 69 6e 67 20 74 | "I'm be|coming t|
|00002740| 69 72 65 64 20 6f 66 20 | 77 69 6e 6e 69 6e 67 2e |ired of |winning.|
|00002750| 2e 2e 22 20 22 49 20 77 | 6f 6e 2e 22 20 68 75 6d |.." "I w|on." hum|
|00002760| 61 6e 2d 77 6f 6e 20 22 | 4f 4b 2c 20 79 6f 75 20 |an-won "|OK, you |
|00002770| 77 6f 6e 20 74 68 69 73 | 20 6f 6e 65 2e 20 49 2c |won this| one. I,|
|00002780| 20 66 6f 72 20 6f 6e 65 | 2c 20 6e 65 76 65 72 20 | for one|, never |
|00002790| 74 61 6b 65 20 6d 79 20 | 6d 6f 76 65 73 20 62 61 |take my |moves ba|
|000027a0| 63 6b 2e 2e 2e 22 20 22 | 4f 4b 2c 20 79 6f 75 20 |ck..." "|OK, you |
|000027b0| 77 6f 6e 20 74 68 69 73 | 20 6f 6e 65 2e 2e 2e 20 |won this| one... |
|000027c0| 73 6f 20 77 68 61 74 20 | 3f 22 20 22 4f 4b 2c 20 |so what |?" "OK, |
|000027d0| 79 6f 75 20 77 6f 6e 20 | 74 68 69 73 20 6f 6e 65 |you won |this one|
|000027e0| 2e 20 4e 6f 77 2c 20 6c | 65 74 20 6d 65 20 70 6c |. Now, l|et me pl|
|000027f0| 61 79 20 66 69 72 73 74 | 20 6a 75 73 74 20 6f 6e |ay first| just on|
|00002800| 63 65 2e 22 20 68 75 6d | 61 6e 2d 72 65 73 69 67 |ce." hum|an-resig|
|00002810| 6e 65 64 20 22 53 6f 20 | 79 6f 75 20 72 65 73 69 |ned "So |you resi|
|00002820| 67 6e 2e 2e 2e 20 54 68 | 61 74 27 73 20 6a 75 73 |gn... Th|at's jus|
|00002830| 74 20 6f 6e 65 20 6d 6f | 72 65 20 77 69 6e 20 66 |t one mo|re win f|
|00002840| 6f 72 20 6d 65 2e 22 20 | 6e 6f 62 6f 64 79 2d 77 |or me." |nobody-w|
|00002850| 6f 6e 20 22 54 68 69 73 | 20 69 73 20 61 20 64 72 |on "This| is a dr|
|00002860| 61 77 2e 20 49 2c 20 66 | 6f 72 20 6f 6e 65 2c 20 |aw. I, f|or one, |
|00002870| 6e 65 76 65 72 20 74 61 | 6b 65 20 6d 79 20 6d 6f |never ta|ke my mo|
|00002880| 76 65 73 20 62 61 63 6b | 2e 2e 2e 22 20 22 54 68 |ves back|..." "Th|
|00002890| 69 73 20 69 73 20 61 20 | 64 72 61 77 2e 2e 2e 20 |is is a |draw... |
|000028a0| 4a 75 73 74 20 63 68 61 | 6e 63 65 2c 20 49 20 67 |Just cha|nce, I g|
|000028b0| 75 65 73 73 2e 22 20 22 | 54 68 69 73 20 69 73 20 |uess." "|This is |
|000028c0| 61 20 64 72 61 77 2e 20 | 4e 6f 77 2c 20 6c 65 74 |a draw. |Now, let|
|000028d0| 20 6d 65 20 70 6c 61 79 | 20 66 69 72 73 74 20 6a | me play| first j|
|000028e0| 75 73 74 20 6f 6e 63 65 | 2e 22 20 64 72 61 77 2d |ust once|." draw-|
|000028f0| 61 67 72 65 65 64 20 22 | 44 72 61 77 20 61 67 72 |agreed "|Draw agr|
|00002900| 65 65 64 2e 20 49 2c 20 | 66 6f 72 20 6f 6e 65 2c |eed. I, |for one,|
|00002910| 20 6e 65 76 65 72 20 74 | 61 6b 65 20 6d 79 20 6d | never t|ake my m|
|00002920| 6f 76 65 73 20 62 61 63 | 6b 2e 2e 2e 22 20 22 44 |oves bac|k..." "D|
|00002930| 72 61 77 20 61 67 72 65 | 65 64 2e 20 59 6f 75 20 |raw agre|ed. You |
|00002940| 77 65 72 65 20 6c 75 63 | 6b 79 2e 22 20 22 44 72 |were luc|ky." "Dr|
|00002950| 61 77 20 61 67 72 65 65 | 64 2e 20 4e 6f 77 2c 20 |aw agree|d. Now, |
|00002960| 6c 65 74 20 6d 65 20 70 | 6c 61 79 20 66 69 72 73 |let me p|lay firs|
|00002970| 74 20 6a 75 73 74 20 6f | 6e 63 65 2e 22 20 63 72 |t just o|nce." cr|
|00002980| 61 73 68 2d 67 61 6d 65 | 20 22 53 6f 72 72 79 2c |ash-game| "Sorry,|
|00002990| 20 49 20 68 61 76 65 20 | 62 65 65 6e 20 69 6e 74 | I have |been int|
|000029a0| 65 72 72 75 70 74 65 64 | 20 61 6e 64 20 63 61 6e |errupted| and can|
|000029b0| 6e 6f 74 20 72 65 73 75 | 6d 65 20 74 68 61 74 20 |not resu|me that |
|000029c0| 67 61 6d 65 2e 2e 2e 22 | 20 67 6f 6d 6f 6b 75 2d |game..."| gomoku-|
|000029d0| 64 69 73 70 6c 61 79 2d | 73 74 61 74 69 73 74 69 |display-|statisti|
|000029e0| 63 73 20 64 69 6e 67 20 | 67 6f 6d 6f 6b 75 2d 67 |cs ding |gomoku-g|
|000029f0| 61 6d 65 2d 69 6e 2d 70 | 72 6f 67 72 65 73 73 5d |ame-in-p|rogress]|
|00002a00| 20 32 20 22 5c 0a 54 65 | 72 6d 69 6e 61 74 65 20 | 2 "\.Te|rminate |
|00002a10| 74 68 65 20 63 75 72 72 | 65 6e 74 20 67 61 6d 65 |the curr|ent game|
|00002a20| 20 77 69 74 68 20 52 45 | 53 55 4c 54 2e 22 5d 29 | with RE|SULT."])|
|00002a30| 0a 28 66 73 65 74 20 27 | 67 6f 6d 6f 6b 75 2d 63 |.(fset '|gomoku-c|
|00002a40| 72 61 73 68 2d 67 61 6d | 65 20 23 5b 6e 69 6c 20 |rash-gam|e #[nil |
|00002a50| 22 c0 11 c2 c3 21 88 c4 | c5 21 88 c6 20 87 22 20 |"....!..|.!.. ." |
|00002a60| 5b 6e 69 6c 20 67 6f 6d | 6f 6b 75 2d 65 6d 61 63 |[nil gom|oku-emac|
|00002a70| 73 2d 69 73 2d 63 6f 6d | 70 75 74 69 6e 67 20 67 |s-is-com|puting g|
|00002a80| 6f 6d 6f 6b 75 2d 74 65 | 72 6d 69 6e 61 74 65 2d |omoku-te|rminate-|
|00002a90| 67 61 6d 65 20 63 72 61 | 73 68 2d 67 61 6d 65 20 |game cra|sh-game |
|00002aa0| 73 69 74 2d 66 6f 72 20 | 34 20 67 6f 6d 6f 6b 75 |sit-for |4 gomoku|
|00002ab0| 2d 70 72 6f 6d 70 74 2d | 66 6f 72 2d 6f 74 68 65 |-prompt-|for-othe|
|00002ac0| 72 2d 67 61 6d 65 5d 20 | 32 20 22 5c 0a 57 68 61 |r-game] |2 "\.Wha|
|00002ad0| 74 20 74 6f 20 64 6f 20 | 77 68 65 6e 20 45 6d 61 |t to do |when Ema|
|00002ae0| 63 73 20 64 65 74 65 63 | 74 73 20 69 74 20 68 61 |cs detec|ts it ha|
|00002af0| 73 20 62 65 65 6e 20 69 | 6e 74 65 72 72 75 70 74 |s been i|nterrupt|
|00002b00| 65 64 2e 22 5d 29 0a 28 | 66 73 65 74 20 27 67 6f |ed."]).(|fset 'go|
|00002b10| 6d 6f 6b 75 20 23 5b 28 | 26 6f 70 74 69 6f 6e 61 |moku #[(|&optiona|
|00002b20| 6c 20 6e 20 6d 29 20 22 | c0 20 88 09 ab 83 c2 20 |l n m) "|. ..... |
|00002b30| 87 0b ac ef c4 20 c5 20 | 1e 06 1e 07 0e 08 ac 84 |..... . |........|
|00002b40| 0e 07 16 08 0e 09 ac 84 | 0e 06 16 09 0e 08 ca 57 |........|.......W|
|00002b50| ab 86 cb cc 21 88 aa 99 | 0e 09 ca 57 ab 86 cb cd |....!...|...W....|
|00002b60| 21 88 aa 8d 0e 08 0e 07 | 56 ab 86 cb ce 0e 08 5c |!.......|V......\|
|00002b70| 22 88 0e 09 0e 06 56 ab | 94 0e 09 0e 0f 9a ac 8d |".....V.|........|
|00002b80| d0 d1 d2 0e 09 5c 22 21 | ac 84 0e 06 16 09 2a d3 |.....\"!|......*.|
|00002b90| d4 21 88 d5 0e 08 0e 09 | 5c 22 88 d0 d6 21 ab 83 |.!......|\"...!..|
|00002ba0| d7 20 87 d8 20 87 d0 d9 | 21 ab 83 d8 20 87 da 20 |. .. ...|!... .. |
|00002bb0| 87 22 20 5b 67 6f 6d 6f | 6b 75 2d 73 77 69 74 63 |." [gomo|ku-switc|
|00002bc0| 68 2d 74 6f 2d 77 69 6e | 64 6f 77 20 67 6f 6d 6f |h-to-win|dow gomo|
|00002bd0| 6b 75 2d 65 6d 61 63 73 | 2d 69 73 2d 63 6f 6d 70 |ku-emacs|-is-comp|
|00002be0| 75 74 69 6e 67 20 67 6f | 6d 6f 6b 75 2d 63 72 61 |uting go|moku-cra|
|00002bf0| 73 68 2d 67 61 6d 65 20 | 67 6f 6d 6f 6b 75 2d 67 |sh-game |gomoku-g|
|00002c00| 61 6d 65 2d 69 6e 2d 70 | 72 6f 67 72 65 73 73 20 |ame-in-p|rogress |
|00002c10| 67 6f 6d 6f 6b 75 2d 6d | 61 78 2d 77 69 64 74 68 |gomoku-m|ax-width|
|00002c20| 20 67 6f 6d 6f 6b 75 2d | 6d 61 78 2d 68 65 69 67 | gomoku-|max-heig|
|00002c30| 68 74 20 6d 61 78 2d 68 | 65 69 67 68 74 20 6d 61 |ht max-h|eight ma|
|00002c40| 78 2d 77 69 64 74 68 20 | 6e 20 6d 20 31 20 65 72 |x-width |n m 1 er|
|00002c50| 72 6f 72 20 22 49 20 6e | 65 65 64 20 61 74 20 6c |ror "I n|eed at l|
|00002c60| 65 61 73 74 20 31 20 63 | 6f 6c 75 6d 6e 22 20 22 |east 1 c|olumn" "|
|00002c70| 49 20 6e 65 65 64 20 61 | 74 20 6c 65 61 73 74 20 |I need a|t least |
|00002c80| 31 20 72 6f 77 22 20 22 | 49 20 63 61 6e 6e 6f 74 |1 row" "|I cannot|
|00002c90| 20 64 69 73 70 6c 61 79 | 20 25 64 20 63 6f 6c 75 | display| %d colu|
|00002ca0| 6d 6e 73 20 69 6e 20 74 | 68 61 74 20 77 69 6e 64 |mns in t|hat wind|
|00002cb0| 6f 77 22 20 67 6f 6d 6f | 6b 75 2d 73 61 76 65 64 |ow" gomo|ku-saved|
|00002cc0| 2d 62 6f 61 72 64 2d 68 | 65 69 67 68 74 20 79 2d |-board-h|eight y-|
|00002cd0| 6f 72 2d 6e 2d 70 20 66 | 6f 72 6d 61 74 20 22 44 |or-n-p f|ormat "D|
|00002ce0| 6f 20 79 6f 75 20 72 65 | 61 6c 6c 79 20 77 61 6e |o you re|ally wan|
|00002cf0| 74 20 25 64 20 72 6f 77 | 73 20 22 20 6d 65 73 73 |t %d row|s " mess|
|00002d00| 61 67 65 20 22 4f 6e 65 | 20 6d 6f 6d 65 6e 74 2c |age "One| moment,|
|00002d10| 20 70 6c 65 61 73 65 2e | 2e 2e 22 20 67 6f 6d 6f | please.|.." gomo|
|00002d20| 6b 75 2d 73 74 61 72 74 | 2d 67 61 6d 65 20 22 44 |ku-start|-game "D|
|00002d30| 6f 20 79 6f 75 20 61 6c | 6c 6f 77 20 6d 65 20 74 |o you al|low me t|
|00002d40| 6f 20 70 6c 61 79 20 66 | 69 72 73 74 20 22 20 67 |o play f|irst " g|
|00002d50| 6f 6d 6f 6b 75 2d 65 6d | 61 63 73 2d 70 6c 61 79 |omoku-em|acs-play|
|00002d60| 73 20 67 6f 6d 6f 6b 75 | 2d 70 72 6f 6d 70 74 2d |s gomoku|-prompt-|
|00002d70| 66 6f 72 2d 6d 6f 76 65 | 20 22 53 68 61 6c 6c 20 |for-move| "Shall |
|00002d80| 77 65 20 63 6f 6e 74 69 | 6e 75 65 20 6f 75 72 20 |we conti|nue our |
|00002d90| 67 61 6d 65 20 22 20 67 | 6f 6d 6f 6b 75 2d 68 75 |game " g|omoku-hu|
|00002da0| 6d 61 6e 2d 72 65 73 69 | 67 6e 73 5d 20 34 20 22 |man-resi|gns] 4 "|
|00002db0| 5c 0a 53 74 61 72 74 20 | 61 20 47 6f 6d 6f 6b 75 |\.Start |a Gomoku|
|00002dc0| 20 67 61 6d 65 20 62 65 | 74 77 65 65 6e 20 79 6f | game be|tween yo|
|00002dd0| 75 20 61 6e 64 20 45 6d | 61 63 73 2e 0a 49 66 20 |u and Em|acs..If |
|00002de0| 61 20 67 61 6d 65 20 69 | 73 20 69 6e 20 70 72 6f |a game i|s in pro|
|00002df0| 67 72 65 73 73 2c 20 74 | 68 69 73 20 63 6f 6d 6d |gress, t|his comm|
|00002e00| 61 6e 64 20 61 6c 6c 6f | 77 20 79 6f 75 20 74 6f |and allo|w you to|
|00002e10| 20 72 65 73 75 6d 65 20 | 69 74 2e 0a 49 66 20 6f | resume |it..If o|
|00002e20| 70 74 69 6f 6e 61 6c 20 | 61 72 67 75 6d 65 6e 74 |ptional |argument|
|00002e30| 73 20 4e 20 61 6e 64 20 | 4d 20 61 72 65 20 67 69 |s N and |M are gi|
|00002e40| 76 65 6e 2c 20 61 6e 20 | 4e 20 62 79 20 4d 20 62 |ven, an |N by M b|
|00002e50| 6f 61 72 64 20 69 73 20 | 75 73 65 64 2e 0a 0a 59 |oard is |used...Y|
|00002e60| 6f 75 20 61 6e 64 20 45 | 6d 61 63 73 20 70 6c 61 |ou and E|macs pla|
|00002e70| 79 20 69 6e 20 74 75 72 | 6e 20 62 79 20 6d 61 72 |y in tur|n by mar|
|00002e80| 6b 69 6e 67 20 61 20 66 | 72 65 65 20 73 71 75 61 |king a f|ree squa|
|00002e90| 72 65 2e 20 59 6f 75 20 | 6d 61 72 6b 20 69 74 20 |re. You |mark it |
|00002ea0| 77 69 74 68 20 58 0a 61 | 6e 64 20 45 6d 61 63 73 |with X.a|nd Emacs|
|00002eb0| 20 6d 61 72 6b 73 20 69 | 74 20 77 69 74 68 20 4f | marks i|t with O|
|00002ec0| 2e 20 54 68 65 20 77 69 | 6e 6e 65 72 20 69 73 20 |. The wi|nner is |
|00002ed0| 74 68 65 20 66 69 72 73 | 74 20 74 6f 20 67 65 74 |the firs|t to get|
|00002ee0| 20 66 69 76 65 20 63 6f | 6e 74 69 67 75 6f 75 73 | five co|ntiguous|
|00002ef0| 0a 6d 61 72 6b 73 20 68 | 6f 72 69 7a 6f 6e 74 61 |.marks h|orizonta|
|00002f00| 6c 6c 79 2c 20 76 65 72 | 74 69 63 61 6c 6c 79 20 |lly, ver|tically |
|00002f10| 6f 72 20 69 6e 20 64 69 | 61 67 6f 6e 61 6c 2e 0a |or in di|agonal..|
|00002f20| 59 6f 75 20 70 6c 61 79 | 20 62 79 20 6d 6f 76 69 |You play| by movi|
|00002f30| 6e 67 20 74 68 65 20 63 | 75 72 73 6f 72 20 6f 76 |ng the c|ursor ov|
|00002f40| 65 72 20 74 68 65 20 73 | 71 75 61 72 65 20 79 6f |er the s|quare yo|
|00002f50| 75 20 63 68 6f 6f 73 65 | 20 61 6e 64 20 68 69 74 |u choose| and hit|
|00002f60| 74 69 6e 67 20 52 45 54 | 2c 0a 78 2c 20 2e 2e 20 |ting RET|,.x, .. |
|00002f70| 6f 72 20 77 68 61 74 65 | 76 65 72 20 68 61 73 20 |or whate|ver has |
|00002f80| 62 65 65 6e 20 73 65 74 | 20 6c 6f 63 61 6c 6c 79 |been set| locally|
|00002f90| 2e 0a 55 73 65 20 43 2d | 68 20 6d 20 66 6f 72 20 |..Use C-|h m for |
|00002fa0| 6d 6f 72 65 20 69 6e 66 | 6f 2e 22 20 6e 69 6c 5d |more inf|o." nil]|
|00002fb0| 29 0a 28 66 73 65 74 20 | 27 67 6f 6d 6f 6b 75 2d |).(fset |'gomoku-|
|00002fc0| 65 6d 61 63 73 2d 70 6c | 61 79 73 20 23 5b 6e 69 |emacs-pl|ays #[ni|
|00002fd0| 6c 20 22 c0 20 88 09 ab | 83 c2 20 87 0b ac 83 c4 |l ". ...|.. .....|
|00002fe0| 20 87 c5 c6 21 88 c7 89 | 1e 08 1e 09 ca 20 89 16 | ...!...|..... ..|
|00002ff0| 09 ac 85 cb cc 21 aa c3 | 0e 0d 0e 09 48 16 08 ce |.....!..|....H...|
|00003000| 0e 09 cf 5c 22 88 0e 08 | 0e 10 59 ab 8e d1 0e 09 |...\"...|..Y.....|
|00003010| cf 5c 22 88 d2 20 88 cb | d3 21 aa a1 0e 08 d4 55 |.\".. ..|.!.....U|
|00003020| ab 85 cb cc 21 aa 96 0e | 15 0e 16 56 ab 8d 0e 17 |....!...|...V....|
|00003030| ac 89 d8 20 ab 85 cb d9 | 21 aa 82 da 20 2a 87 22 |... ....|!... *."|
|00003040| 20 5b 67 6f 6d 6f 6b 75 | 2d 73 77 69 74 63 68 2d | [gomoku|-switch-|
|00003050| 74 6f 2d 77 69 6e 64 6f | 77 20 67 6f 6d 6f 6b 75 |to-windo|w gomoku|
|00003060| 2d 65 6d 61 63 73 2d 69 | 73 2d 63 6f 6d 70 75 74 |-emacs-i|s-comput|
|00003070| 69 6e 67 20 67 6f 6d 6f | 6b 75 2d 63 72 61 73 68 |ing gomo|ku-crash|
|00003080| 2d 67 61 6d 65 20 67 6f | 6d 6f 6b 75 2d 67 61 6d |-game go|moku-gam|
|00003090| 65 2d 69 6e 2d 70 72 6f | 67 72 65 73 73 20 67 6f |e-in-pro|gress go|
|000030a0| 6d 6f 6b 75 2d 70 72 6f | 6d 70 74 2d 66 6f 72 2d |moku-pro|mpt-for-|
|000030b0| 6f 74 68 65 72 2d 67 61 | 6d 65 20 6d 65 73 73 61 |other-ga|me messa|
|000030c0| 67 65 20 22 4c 65 74 20 | 6d 65 20 74 68 69 6e 6b |ge "Let |me think|
|000030d0| 2e 2e 2e 22 20 6e 69 6c | 20 73 63 6f 72 65 20 73 |..." nil| score s|
|000030e0| 71 75 61 72 65 20 67 6f | 6d 6f 6b 75 2d 73 74 72 |quare go|moku-str|
|000030f0| 6f 6e 67 65 73 74 2d 73 | 71 75 61 72 65 20 67 6f |ongest-s|quare go|
|00003100| 6d 6f 6b 75 2d 74 65 72 | 6d 69 6e 61 74 65 2d 67 |moku-ter|minate-g|
|00003110| 61 6d 65 20 6e 6f 62 6f | 64 79 2d 77 6f 6e 20 67 |ame nobo|dy-won g|
|00003120| 6f 6d 6f 6b 75 2d 73 63 | 6f 72 65 2d 74 61 62 6c |omoku-sc|ore-tabl|
|00003130| 65 20 67 6f 6d 6f 6b 75 | 2d 70 6c 61 79 2d 6d 6f |e gomoku|-play-mo|
|00003140| 76 65 20 36 20 67 6f 6d | 6f 6b 75 2d 77 69 6e 6e |ve 6 gom|oku-winn|
|00003150| 69 6e 67 2d 74 68 72 65 | 73 68 6f 6c 64 20 67 6f |ing-thre|shold go|
|00003160| 6d 6f 6b 75 2d 66 69 6e | 64 2d 66 69 6c 6c 65 64 |moku-fin|d-filled|
|00003170| 2d 71 74 75 70 6c 65 20 | 67 6f 6d 6f 6b 75 2d 63 |-qtuple |gomoku-c|
|00003180| 72 6f 73 73 2d 77 69 6e | 6e 69 6e 67 2d 71 74 75 |ross-win|ning-qtu|
|00003190| 70 6c 65 20 65 6d 61 63 | 73 2d 77 6f 6e 20 30 20 |ple emac|s-won 0 |
|000031a0| 67 6f 6d 6f 6b 75 2d 6e | 75 6d 62 65 72 2d 6f 66 |gomoku-n|umber-of|
|000031b0| 2d 6d 6f 76 65 73 20 67 | 6f 6d 6f 6b 75 2d 64 72 |-moves g|omoku-dr|
|000031c0| 61 77 2d 6c 69 6d 69 74 | 20 67 6f 6d 6f 6b 75 2d |aw-limit| gomoku-|
|000031d0| 68 75 6d 61 6e 2d 72 65 | 66 75 73 65 64 2d 64 72 |human-re|fused-dr|
|000031e0| 61 77 20 67 6f 6d 6f 6b | 75 2d 6f 66 66 65 72 2d |aw gomok|u-offer-|
|000031f0| 61 2d 64 72 61 77 20 64 | 72 61 77 2d 61 67 72 65 |a-draw d|raw-agre|
|00003200| 65 64 20 67 6f 6d 6f 6b | 75 2d 70 72 6f 6d 70 74 |ed gomok|u-prompt|
|00003210| 2d 66 6f 72 2d 6d 6f 76 | 65 5d 20 34 20 22 5c 0a |-for-mov|e] 4 "\.|
|00003220| 43 6f 6d 70 75 74 65 20 | 45 6d 61 63 73 20 6e 65 |Compute |Emacs ne|
|00003230| 78 74 20 6d 6f 76 65 20 | 61 6e 64 20 70 6c 61 79 |xt move |and play|
|00003240| 20 69 74 2e 22 20 6e 69 | 6c 5d 29 0a 28 66 73 65 | it." ni|l]).(fse|
|00003250| 74 20 27 67 6f 6d 6f 6b | 75 2d 68 75 6d 61 6e 2d |t 'gomok|u-human-|
|00003260| 70 6c 61 79 73 20 23 5b | 6e 69 6c 20 22 c0 20 88 |plays #[|nil ". .|
|00003270| 09 ab 83 c2 20 87 0b ac | 83 c4 20 87 c5 89 1e 06 |.... ...|.. .....|
|00003280| 1e 07 c8 20 89 16 07 ac | 85 c9 ca 21 aa b3 0e 0b |... ....|...!....|
|00003290| 0e 07 48 cc 55 ac 85 c9 | cd 21 aa a5 0e 0e 0e 07 |..H.U...|.!......|
|000032a0| 48 16 06 cf 0e 07 d0 5c | 22 88 0e 06 0e 11 59 ab |H......\|".....Y.|
|000032b0| 8f d2 0e 07 d0 5c 22 ab | 88 d3 20 88 d4 d5 21 aa |.....\".|.. ...!.|
|000032c0| 82 d6 20 2a 87 22 20 5b | 67 6f 6d 6f 6b 75 2d 73 |.. *." [|gomoku-s|
|000032d0| 77 69 74 63 68 2d 74 6f | 2d 77 69 6e 64 6f 77 20 |witch-to|-window |
|000032e0| 67 6f 6d 6f 6b 75 2d 65 | 6d 61 63 73 2d 69 73 2d |gomoku-e|macs-is-|
|000032f0| 63 6f 6d 70 75 74 69 6e | 67 20 67 6f 6d 6f 6b 75 |computin|g gomoku|
|00003300| 2d 63 72 61 73 68 2d 67 | 61 6d 65 20 67 6f 6d 6f |-crash-g|ame gomo|
|00003310| 6b 75 2d 67 61 6d 65 2d | 69 6e 2d 70 72 6f 67 72 |ku-game-|in-progr|
|00003320| 65 73 73 20 67 6f 6d 6f | 6b 75 2d 70 72 6f 6d 70 |ess gomo|ku-promp|
|00003330| 74 2d 66 6f 72 2d 6f 74 | 68 65 72 2d 67 61 6d 65 |t-for-ot|her-game|
|00003340| 20 6e 69 6c 20 73 63 6f | 72 65 20 73 71 75 61 72 | nil sco|re squar|
|00003350| 65 20 67 6f 6d 6f 6b 75 | 2d 70 6f 69 6e 74 2d 73 |e gomoku|-point-s|
|00003360| 71 75 61 72 65 20 65 72 | 72 6f 72 20 22 59 6f 75 |quare er|ror "You|
|00003370| 72 20 70 6f 69 6e 74 20 | 69 73 20 6e 6f 74 20 6f |r point |is not o|
|00003380| 6e 20 61 20 73 71 75 61 | 72 65 2e 20 52 65 74 72 |n a squa|re. Retr|
|00003390| 79 20 21 22 20 67 6f 6d | 6f 6b 75 2d 62 6f 61 72 |y !" gom|oku-boar|
|000033a0| 64 20 30 20 22 59 6f 75 | 72 20 70 6f 69 6e 74 20 |d 0 "You|r point |
|000033b0| 69 73 20 6e 6f 74 20 6f | 6e 20 61 20 66 72 65 65 |is not o|n a free|
|000033c0| 20 73 71 75 61 72 65 2e | 20 52 65 74 72 79 20 21 | square.| Retry !|
|000033d0| 22 20 67 6f 6d 6f 6b 75 | 2d 73 63 6f 72 65 2d 74 |" gomoku|-score-t|
|000033e0| 61 62 6c 65 20 67 6f 6d | 6f 6b 75 2d 70 6c 61 79 |able gom|oku-play|
|000033f0| 2d 6d 6f 76 65 20 31 20 | 67 6f 6d 6f 6b 75 2d 6c |-move 1 |gomoku-l|
|00003400| 6f 6f 73 69 6e 67 2d 74 | 68 72 65 73 68 6f 6c 64 |oosing-t|hreshold|
|00003410| 20 67 6f 6d 6f 6b 75 2d | 66 69 6e 64 2d 66 69 6c | gomoku-|find-fil|
|00003420| 6c 65 64 2d 71 74 75 70 | 6c 65 20 67 6f 6d 6f 6b |led-qtup|le gomok|
|00003430| 75 2d 63 72 6f 73 73 2d | 77 69 6e 6e 69 6e 67 2d |u-cross-|winning-|
|00003440| 71 74 75 70 6c 65 20 67 | 6f 6d 6f 6b 75 2d 74 65 |qtuple g|omoku-te|
|00003450| 72 6d 69 6e 61 74 65 2d | 67 61 6d 65 20 68 75 6d |rminate-|game hum|
|00003460| 61 6e 2d 77 6f 6e 20 67 | 6f 6d 6f 6b 75 2d 65 6d |an-won g|omoku-em|
|00003470| 61 63 73 2d 70 6c 61 79 | 73 5d 20 34 20 22 5c 0a |acs-play|s] 4 "\.|
|00003480| 53 69 67 6e 61 6c 20 74 | 6f 20 74 68 65 20 47 6f |Signal t|o the Go|
|00003490| 6d 6f 6b 75 20 70 72 6f | 67 72 61 6d 20 74 68 61 |moku pro|gram tha|
|000034a0| 74 20 79 6f 75 20 68 61 | 76 65 20 70 6c 61 79 65 |t you ha|ve playe|
|000034b0| 64 2e 0a 59 6f 75 20 6d | 75 73 74 20 68 61 76 65 |d..You m|ust have|
|000034c0| 20 70 75 74 20 74 68 65 | 20 63 75 72 73 6f 72 20 | put the| cursor |
|000034d0| 6f 6e 20 74 68 65 20 73 | 71 75 61 72 65 20 77 68 |on the s|quare wh|
|000034e0| 65 72 65 20 79 6f 75 20 | 77 61 6e 74 20 74 6f 20 |ere you |want to |
|000034f0| 70 6c 61 79 2e 0a 49 66 | 20 74 68 65 20 67 61 6d |play..If| the gam|
|00003500| 65 20 69 73 20 66 69 6e | 69 73 68 65 64 2c 20 74 |e is fin|ished, t|
|00003510| 68 69 73 20 63 6f 6d 6d | 61 6e 64 20 72 65 71 75 |his comm|and requ|
|00003520| 65 73 74 73 20 66 6f 72 | 20 61 6e 6f 74 68 65 72 |ests for| another|
|00003530| 20 67 61 6d 65 2e 22 20 | 6e 69 6c 5d 29 0a 28 66 | game." |nil]).(f|
|00003540| 73 65 74 20 27 67 6f 6d | 6f 6b 75 2d 68 75 6d 61 |set 'gom|oku-huma|
|00003550| 6e 2d 74 61 6b 65 73 2d | 62 61 63 6b 20 23 5b 6e |n-takes-|back #[n|
|00003560| 69 6c 20 22 c0 20 88 09 | ab 83 c2 20 87 0b ac 8b |il ". ..|... ....|
|00003570| c4 c5 21 88 c6 c7 21 88 | c8 20 87 0e 09 ca 55 ab |..!...!.|. ....U.|
|00003580| 84 c4 cb 21 87 c4 cc 21 | 88 cd 16 0e 0e 09 1e 0f |...!...!|........|
|00003590| 0e 0f 0e 09 55 ab 85 d0 | 20 88 aa 74 29 d1 20 87 |....U...| ..t). .|
|000035a0| 22 20 5b 67 6f 6d 6f 6b | 75 2d 73 77 69 74 63 68 |" [gomok|u-switch|
|000035b0| 2d 74 6f 2d 77 69 6e 64 | 6f 77 20 67 6f 6d 6f 6b |-to-wind|ow gomok|
|000035c0| 75 2d 65 6d 61 63 73 2d | 69 73 2d 63 6f 6d 70 75 |u-emacs-|is-compu|
|000035d0| 74 69 6e 67 20 67 6f 6d | 6f 6b 75 2d 63 72 61 73 |ting gom|oku-cras|
|000035e0| 68 2d 67 61 6d 65 20 67 | 6f 6d 6f 6b 75 2d 67 61 |h-game g|omoku-ga|
|000035f0| 6d 65 2d 69 6e 2d 70 72 | 6f 67 72 65 73 73 20 6d |me-in-pr|ogress m|
|00003600| 65 73 73 61 67 65 20 22 | 54 6f 6f 20 6c 61 74 65 |essage "|Too late|
|00003610| 20 66 6f 72 20 74 61 6b | 69 6e 67 20 62 61 63 6b | for tak|ing back|
|00003620| 2e 2e 2e 22 20 73 69 74 | 2d 66 6f 72 20 34 20 67 |..." sit|-for 4 g|
|00003630| 6f 6d 6f 6b 75 2d 70 72 | 6f 6d 70 74 2d 66 6f 72 |omoku-pr|ompt-for|
|00003640| 2d 6f 74 68 65 72 2d 67 | 61 6d 65 20 67 6f 6d 6f |-other-g|ame gomo|
|00003650| 6b 75 2d 6e 75 6d 62 65 | 72 2d 6f 66 2d 68 75 6d |ku-numbe|r-of-hum|
|00003660| 61 6e 2d 6d 6f 76 65 73 | 20 30 20 22 59 6f 75 20 |an-moves| 0 "You |
|00003670| 68 61 76 65 20 6e 6f 74 | 20 70 6c 61 79 65 64 20 |have not| played |
|00003680| 79 65 74 2e 2e 2e 20 59 | 6f 75 72 20 6d 6f 76 65 |yet... Y|our move|
|00003690| 20 3f 22 20 22 4f 6e 65 | 20 6d 6f 6d 65 6e 74 2c | ?" "One| moment,|
|000036a0| 20 70 6c 65 61 73 65 2e | 2e 2e 22 20 74 20 67 6f | please.|.." t go|
|000036b0| 6d 6f 6b 75 2d 68 75 6d | 61 6e 2d 74 6f 6f 6b 2d |moku-hum|an-took-|
|000036c0| 62 61 63 6b 20 6e 75 6d | 62 65 72 20 67 6f 6d 6f |back num|ber gomo|
|000036d0| 6b 75 2d 74 61 6b 65 2d | 62 61 63 6b 20 67 6f 6d |ku-take-|back gom|
|000036e0| 6f 6b 75 2d 70 72 6f 6d | 70 74 2d 66 6f 72 2d 6d |oku-prom|pt-for-m|
|000036f0| 6f 76 65 5d 20 32 20 22 | 5c 0a 53 69 67 6e 61 6c |ove] 2 "|\.Signal|
|00003700| 20 74 6f 20 74 68 65 20 | 47 6f 6d 6f 6b 75 20 70 | to the |Gomoku p|
|00003710| 72 6f 67 72 61 6d 20 74 | 68 61 74 20 79 6f 75 20 |rogram t|hat you |
|00003720| 77 69 73 68 20 74 6f 20 | 74 61 6b 65 20 62 61 63 |wish to |take bac|
|00003730| 6b 20 79 6f 75 72 20 6c | 61 73 74 20 6d 6f 76 65 |k your l|ast move|
|00003740| 2e 22 20 6e 69 6c 5d 29 | 0a 28 66 73 65 74 20 27 |." nil])|.(fset '|
|00003750| 67 6f 6d 6f 6b 75 2d 68 | 75 6d 61 6e 2d 72 65 73 |gomoku-h|uman-res|
|00003760| 69 67 6e 73 20 23 5b 6e | 69 6c 20 22 c0 20 88 09 |igns #[n|il ". ..|
|00003770| ab 83 c2 20 87 0b ac 84 | c4 c5 21 87 c6 c7 21 ab |... ....|..!...!.|
|00003780| 84 c8 c9 21 87 c6 ca 21 | ab 83 cb 20 87 c8 c9 21 |...!...!|... ...!|
|00003790| 87 22 20 5b 67 6f 6d 6f | 6b 75 2d 73 77 69 74 63 |." [gomo|ku-switc|
|000037a0| 68 2d 74 6f 2d 77 69 6e | 64 6f 77 20 67 6f 6d 6f |h-to-win|dow gomo|
|000037b0| 6b 75 2d 65 6d 61 63 73 | 2d 69 73 2d 63 6f 6d 70 |ku-emacs|-is-comp|
|000037c0| 75 74 69 6e 67 20 67 6f | 6d 6f 6b 75 2d 63 72 61 |uting go|moku-cra|
|000037d0| 73 68 2d 67 61 6d 65 20 | 67 6f 6d 6f 6b 75 2d 67 |sh-game |gomoku-g|
|000037e0| 61 6d 65 2d 69 6e 2d 70 | 72 6f 67 72 65 73 73 20 |ame-in-p|rogress |
|000037f0| 6d 65 73 73 61 67 65 20 | 22 54 68 65 72 65 20 69 |message |"There i|
|00003800| 73 20 6e 6f 20 67 61 6d | 65 20 69 6e 20 70 72 6f |s no gam|e in pro|
|00003810| 67 72 65 73 73 22 20 79 | 2d 6f 72 2d 6e 2d 70 20 |gress" y|-or-n-p |
|00003820| 22 59 6f 75 20 6d 65 61 | 6e 2c 20 79 6f 75 20 72 |"You mea|n, you r|
|00003830| 65 73 69 67 6e 20 22 20 | 67 6f 6d 6f 6b 75 2d 74 |esign " |gomoku-t|
|00003840| 65 72 6d 69 6e 61 74 65 | 2d 67 61 6d 65 20 68 75 |erminate|-game hu|
|00003850| 6d 61 6e 2d 72 65 73 69 | 67 6e 65 64 20 22 59 6f |man-resi|gned "Yo|
|00003860| 75 20 6d 65 61 6e 2c 20 | 77 65 20 63 6f 6e 74 69 |u mean, |we conti|
|00003870| 6e 75 65 20 22 20 67 6f | 6d 6f 6b 75 2d 70 72 6f |nue " go|moku-pro|
|00003880| 6d 70 74 2d 66 6f 72 2d | 6d 6f 76 65 5d 20 32 20 |mpt-for-|move] 2 |
|00003890| 22 5c 0a 53 69 67 6e 61 | 6c 20 74 6f 20 74 68 65 |"\.Signa|l to the|
|000038a0| 20 47 6f 6d 6f 6b 75 20 | 70 72 6f 67 72 61 6d 20 | Gomoku |program |
|000038b0| 74 68 61 74 20 79 6f 75 | 20 6d 61 79 20 77 61 6e |that you| may wan|
|000038c0| 74 20 74 6f 20 72 65 73 | 69 67 6e 2e 22 20 6e 69 |t to res|ign." ni|
|000038d0| 6c 5d 29 0a 28 66 73 65 | 74 20 27 67 6f 6d 6f 6b |l]).(fse|t 'gomok|
|000038e0| 75 2d 70 72 6f 6d 70 74 | 2d 66 6f 72 2d 6d 6f 76 |u-prompt|-for-mov|
|000038f0| 65 20 23 5b 6e 69 6c 20 | 22 c0 09 c2 55 ab 83 c3 |e #[nil |"...U...|
|00003900| aa 81 c4 21 88 8a c5 20 | 71 29 87 22 20 5b 6d 65 |...!... |q)." [me|
|00003910| 73 73 61 67 65 20 67 6f | 6d 6f 6b 75 2d 6e 75 6d |ssage go|moku-num|
|00003920| 62 65 72 2d 6f 66 2d 68 | 75 6d 61 6e 2d 6d 6f 76 |ber-of-h|uman-mov|
|00003930| 65 73 20 30 20 22 59 6f | 75 72 20 6d 6f 76 65 20 |es 0 "Yo|ur move |
|00003940| 3f 20 28 6d 6f 76 65 20 | 74 6f 20 61 20 66 72 65 |? (move |to a fre|
|00003950| 65 20 73 71 75 61 72 65 | 20 61 6e 64 20 68 69 74 |e square| and hit|
|00003960| 20 58 2c 20 52 45 54 20 | 2e 2e 2e 29 22 20 22 59 | X, RET |...)" "Y|
|00003970| 6f 75 72 20 6d 6f 76 65 | 20 3f 22 20 6f 74 68 65 |our move| ?" othe|
|00003980| 72 2d 62 75 66 66 65 72 | 5d 20 33 20 22 5c 0a 44 |r-buffer|] 3 "\.D|
|00003990| 69 73 70 6c 61 79 20 61 | 20 6d 65 73 73 61 67 65 |isplay a| message|
|000039a0| 20 61 73 6b 69 6e 67 20 | 66 6f 72 20 48 75 6d 61 | asking |for Huma|
|000039b0| 6e 27 73 20 6d 6f 76 65 | 2e 22 5d 29 0a 28 66 73 |n's move|."]).(fs|
|000039c0| 65 74 20 27 67 6f 6d 6f | 6b 75 2d 70 72 6f 6d 70 |et 'gomo|ku-promp|
|000039d0| 74 2d 66 6f 72 2d 6f 74 | 68 65 72 2d 67 61 6d 65 |t-for-ot|her-game|
|000039e0| 20 23 5b 6e 69 6c 20 22 | c0 c1 21 ab 85 c2 0b 0c | #[nil "|..!.....|
|000039f0| 5c 22 87 c5 c6 21 87 22 | 20 5b 79 2d 6f 72 2d 6e |\"...!."| [y-or-n|
|00003a00| 2d 70 20 22 41 6e 6f 74 | 68 65 72 20 67 61 6d 65 |-p "Anot|her game|
|00003a10| 20 22 20 67 6f 6d 6f 6b | 75 20 67 6f 6d 6f 6b 75 | " gomok|u gomoku|
|00003a20| 2d 62 6f 61 72 64 2d 77 | 69 64 74 68 20 67 6f 6d |-board-w|idth gom|
|00003a30| 6f 6b 75 2d 62 6f 61 72 | 64 2d 68 65 69 67 68 74 |oku-boar|d-height|
|00003a40| 20 6d 65 73 73 61 67 65 | 20 22 43 68 69 63 6b 65 | message| "Chicke|
|00003a50| 6e 20 21 22 5d 20 33 20 | 22 5c 0a 41 73 6b 20 66 |n !"] 3 |"\.Ask f|
|00003a60| 6f 72 20 61 6e 6f 74 68 | 65 72 20 67 61 6d 65 2c |or anoth|er game,|
|00003a70| 20 61 6e 64 20 73 74 61 | 72 74 20 69 74 2e 22 5d | and sta|rt it."]|
|00003a80| 29 0a 28 66 73 65 74 20 | 27 67 6f 6d 6f 6b 75 2d |).(fset |'gomoku-|
|00003a90| 6f 66 66 65 72 2d 61 2d | 64 72 61 77 20 23 5b 6e |offer-a-|draw #[n|
|00003aa0| 69 6c 20 22 c0 c1 21 ae | 83 c2 89 13 87 22 20 5b |il "..!.|....." [|
|00003ab0| 79 2d 6f 72 2d 6e 2d 70 | 20 22 49 20 6f 66 66 65 |y-or-n-p| "I offe|
|00003ac0| 72 20 79 6f 75 20 61 20 | 64 72 61 77 2e 20 44 6f |r you a |draw. Do|
|00003ad0| 20 79 6f 75 20 61 63 63 | 65 70 74 20 69 74 20 22 | you acc|ept it "|
|00003ae0| 20 74 20 67 6f 6d 6f 6b | 75 2d 68 75 6d 61 6e 2d | t gomok|u-human-|
|00003af0| 72 65 66 75 73 65 64 2d | 64 72 61 77 5d 20 32 20 |refused-|draw] 2 |
|00003b00| 22 5c 0a 4f 66 66 65 72 | 20 61 20 64 72 61 77 20 |"\.Offer| a draw |
|00003b10| 61 6e 64 20 72 65 74 75 | 72 6e 20 54 20 69 66 20 |and retu|rn T if |
|00003b20| 48 75 6d 61 6e 20 61 63 | 63 65 70 74 65 64 20 69 |Human ac|cepted i|
|00003b30| 74 2e 22 5d 29 0a 28 64 | 65 66 63 6f 6e 73 74 20 |t."]).(d|efconst |
|00003b40| 67 6f 6d 6f 6b 75 2d 73 | 71 75 61 72 65 2d 77 69 |gomoku-s|quare-wi|
|00003b50| 64 74 68 20 34 20 22 5c | 0a 2a 48 6f 72 69 7a 6f |dth 4 "\|.*Horizo|
|00003b60| 6e 74 61 6c 20 73 70 61 | 63 69 6e 67 20 62 65 74 |ntal spa|cing bet|
|00003b70| 77 65 65 6e 20 73 71 75 | 61 72 65 73 20 6f 6e 20 |ween squ|ares on |
|00003b80| 74 68 65 20 47 6f 6d 6f | 6b 75 20 62 6f 61 72 64 |the Gomo|ku board|
|00003b90| 2e 22 29 0a 28 64 65 66 | 63 6f 6e 73 74 20 67 6f |.").(def|const go|
|00003ba0| 6d 6f 6b 75 2d 73 71 75 | 61 72 65 2d 68 65 69 67 |moku-squ|are-heig|
|00003bb0| 68 74 20 32 20 22 5c 0a | 2a 56 65 72 74 69 63 61 |ht 2 "\.|*Vertica|
|00003bc0| 6c 20 73 70 61 63 69 6e | 67 20 62 65 74 77 65 65 |l spacin|g betwee|
|00003bd0| 6e 20 73 71 75 61 72 65 | 73 20 6f 6e 20 74 68 65 |n square|s on the|
|00003be0| 20 47 6f 6d 6f 6b 75 20 | 62 6f 61 72 64 2e 22 29 | Gomoku |board.")|
|00003bf0| 0a 28 64 65 66 63 6f 6e | 73 74 20 67 6f 6d 6f 6b |.(defcon|st gomok|
|00003c00| 75 2d 78 2d 6f 66 66 73 | 65 74 20 33 20 22 5c 0a |u-x-offs|et 3 "\.|
|00003c10| 2a 4e 75 6d 62 65 72 20 | 6f 66 20 63 6f 6c 75 6d |*Number |of colum|
|00003c20| 6e 73 20 62 65 74 77 65 | 65 6e 20 74 68 65 20 47 |ns betwe|en the G|
|00003c30| 6f 6d 6f 6b 75 20 62 6f | 61 72 64 20 61 6e 64 20 |omoku bo|ard and |
|00003c40| 74 68 65 20 73 69 64 65 | 20 6f 66 20 74 68 65 20 |the side| of the |
|00003c50| 77 69 6e 64 6f 77 2e 22 | 29 0a 28 64 65 66 63 6f |window."|).(defco|
|00003c60| 6e 73 74 20 67 6f 6d 6f | 6b 75 2d 79 2d 6f 66 66 |nst gomo|ku-y-off|
|00003c70| 73 65 74 20 31 20 22 5c | 0a 2a 4e 75 6d 62 65 72 |set 1 "\|.*Number|
|00003c80| 20 6f 66 20 6c 69 6e 65 | 73 20 62 65 74 77 65 65 | of line|s betwee|
|00003c90| 6e 20 74 68 65 20 47 6f | 6d 6f 6b 75 20 62 6f 61 |n the Go|moku boa|
|00003ca0| 72 64 20 61 6e 64 20 74 | 68 65 20 74 6f 70 20 6f |rd and t|he top o|
|00003cb0| 66 20 74 68 65 20 77 69 | 6e 64 6f 77 2e 22 29 0a |f the wi|ndow.").|
|00003cc0| 28 66 73 65 74 20 27 67 | 6f 6d 6f 6b 75 2d 6d 61 |(fset 'g|omoku-ma|
|00003cd0| 78 2d 77 69 64 74 68 20 | 23 5b 6e 69 6c 20 22 c0 |x-width |#[nil ".|
|00003ce0| c1 20 21 5c 6e 5a 5c 6e | 5a c3 5a 0c a5 54 87 22 |. !\nZ\n|Z.Z..T."|
|00003cf0| 20 5b 77 69 6e 64 6f 77 | 2d 77 69 64 74 68 20 73 | [window|-width s|
|00003d00| 65 6c 65 63 74 65 64 2d | 77 69 6e 64 6f 77 20 67 |elected-|window g|
|00003d10| 6f 6d 6f 6b 75 2d 78 2d | 6f 66 66 73 65 74 20 31 |omoku-x-|offset 1|
|00003d20| 20 67 6f 6d 6f 6b 75 2d | 73 71 75 61 72 65 2d 77 | gomoku-|square-w|
|00003d30| 69 64 74 68 5d 20 32 20 | 22 5c 0a 4c 61 72 67 65 |idth] 2 |"\.Large|
|00003d40| 73 74 20 70 6f 73 73 69 | 62 6c 65 20 62 6f 61 72 |st possi|ble boar|
|00003d50| 64 20 77 69 64 74 68 20 | 66 6f 72 20 74 68 65 20 |d width |for the |
|00003d60| 63 75 72 72 65 6e 74 20 | 77 69 6e 64 6f 77 2e 22 |current |window."|
|00003d70| 5d 29 0a 28 66 73 65 74 | 20 27 67 6f 6d 6f 6b 75 |]).(fset| 'gomoku|
|00003d80| 2d 6d 61 78 2d 68 65 69 | 67 68 74 20 23 5b 6e 69 |-max-hei|ght #[ni|
|00003d90| 6c 20 22 c0 c1 20 21 5c | 6e 5a 5c 6e 5a c3 5a 0c |l ".. !\|nZ\nZ.Z.|
|00003da0| a5 54 87 22 20 5b 77 69 | 6e 64 6f 77 2d 68 65 69 |.T." [wi|ndow-hei|
|00003db0| 67 68 74 20 73 65 6c 65 | 63 74 65 64 2d 77 69 6e |ght sele|cted-win|
|00003dc0| 64 6f 77 20 67 6f 6d 6f | 6b 75 2d 79 2d 6f 66 66 |dow gomo|ku-y-off|
|00003dd0| 73 65 74 20 32 20 67 6f | 6d 6f 6b 75 2d 73 71 75 |set 2 go|moku-squ|
|00003de0| 61 72 65 2d 68 65 69 67 | 68 74 5d 20 32 20 22 5c |are-heig|ht] 2 "\|
|00003df0| 0a 4c 61 72 67 65 73 74 | 20 70 6f 73 73 69 62 6c |.Largest| possibl|
|00003e00| 65 20 62 6f 61 72 64 20 | 68 65 69 67 68 74 20 66 |e board |height f|
|00003e10| 6f 72 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 77 |or the c|urrent w|
|00003e20| 69 6e 64 6f 77 2e 22 5d | 29 0a 28 66 73 65 74 20 |indow."]|).(fset |
|00003e30| 27 67 6f 6d 6f 6b 75 2d | 70 6f 69 6e 74 2d 78 20 |'gomoku-|point-x |
|00003e40| 23 5b 6e 69 6c 20 22 69 | 08 5a 89 19 c2 59 ad 92 |#[nil "i|.Z...Y..|
|00003e50| 09 0b a6 c2 55 ad 8b 09 | 0b a5 54 89 11 0c 58 ad |....U...|..T...X.|
|00003e60| 81 09 29 87 22 20 5b 67 | 6f 6d 6f 6b 75 2d 78 2d |..)." [g|omoku-x-|
|00003e70| 6f 66 66 73 65 74 20 63 | 6f 6c 20 30 20 67 6f 6d |offset c|ol 0 gom|
|00003e80| 6f 6b 75 2d 73 71 75 61 | 72 65 2d 77 69 64 74 68 |oku-squa|re-width|
|00003e90| 20 67 6f 6d 6f 6b 75 2d | 62 6f 61 72 64 2d 77 69 | gomoku-|board-wi|
|00003ea0| 64 74 68 5d 20 33 20 22 | 5c 0a 52 65 74 75 72 6e |dth] 3 "|\.Return|
|00003eb0| 20 74 68 65 20 62 6f 61 | 72 64 20 63 6f 6c 75 6d | the boa|rd colum|
|00003ec0| 6e 20 77 68 65 72 65 20 | 70 6f 69 6e 74 20 69 73 |n where |point is|
|00003ed0| 2c 20 6f 72 20 6e 69 6c | 20 69 66 20 69 74 20 69 |, or nil| if it i|
|00003ee0| 73 20 6e 6f 74 20 61 20 | 62 6f 61 72 64 20 63 6f |s not a |board co|
|00003ef0| 6c 75 6d 6e 2e 22 5d 29 | 0a 28 66 73 65 74 20 27 |lumn."])|.(fset '|
|00003f00| 67 6f 6d 6f 6b 75 2d 70 | 6f 69 6e 74 2d 79 20 23 |gomoku-p|oint-y #|
|00003f10| 5b 6e 69 6c 20 22 c0 c1 | 60 5c 22 5c 6e 5a c1 5a |[nil "..|`\"\nZ.Z|
|00003f20| 89 1b c4 59 ad 93 0b 0d | a6 c4 55 ad 8c 0b 0d a5 |...Y....|..U.....|
|00003f30| 54 89 13 0e 06 58 ad 81 | 0b 29 87 22 20 5b 63 6f |T....X..|.)." [co|
|00003f40| 75 6e 74 2d 6c 69 6e 65 | 73 20 31 20 67 6f 6d 6f |unt-line|s 1 gomo|
|00003f50| 6b 75 2d 79 2d 6f 66 66 | 73 65 74 20 72 6f 77 20 |ku-y-off|set row |
|00003f60| 30 20 67 6f 6d 6f 6b 75 | 2d 73 71 75 61 72 65 2d |0 gomoku|-square-|
|00003f70| 68 65 69 67 68 74 20 67 | 6f 6d 6f 6b 75 2d 62 6f |height g|omoku-bo|
|00003f80| 61 72 64 2d 68 65 69 67 | 68 74 5d 20 34 20 22 5c |ard-heig|ht] 4 "\|
|00003f90| 0a 52 65 74 75 72 6e 20 | 74 68 65 20 62 6f 61 72 |.Return |the boar|
|00003fa0| 64 20 72 6f 77 20 77 68 | 65 72 65 20 70 6f 69 6e |d row wh|ere poin|
|00003fb0| 74 20 69 73 2c 20 6f 72 | 20 6e 69 6c 20 69 66 20 |t is, or| nil if |
|00003fc0| 69 74 20 69 73 20 6e 6f | 74 20 61 20 62 6f 61 72 |it is no|t a boar|
|00003fd0| 64 20 72 6f 77 2e 22 5d | 29 0a 28 66 73 65 74 20 |d row."]|).(fset |
|00003fe0| 27 67 6f 6d 6f 6b 75 2d | 70 6f 69 6e 74 2d 73 71 |'gomoku-|point-sq|
|00003ff0| 75 61 72 65 20 23 5b 6e | 69 6c 20 22 c0 89 19 1a |uare #[n|il "....|
|00004000| c3 20 89 12 ad 8a c4 20 | 89 11 ad 84 c5 5c 6e 09 |. ..... |.....\n.|
|00004010| 5c 22 2a 87 22 20 5b 6e | 69 6c 20 79 20 78 20 67 |\"*." [n|il y x g|
|00004020| 6f 6d 6f 6b 75 2d 70 6f | 69 6e 74 2d 78 20 67 6f |omoku-po|int-x go|
|00004030| 6d 6f 6b 75 2d 70 6f 69 | 6e 74 2d 79 20 67 6f 6d |moku-poi|nt-y gom|
|00004040| 6f 6b 75 2d 78 79 2d 74 | 6f 2d 69 6e 64 65 78 5d |oku-xy-t|o-index]|
|00004050| 20 33 20 22 5c 0a 52 65 | 74 75 72 6e 20 74 68 65 | 3 "\.Re|turn the|
|00004060| 20 69 6e 64 65 78 20 6f | 66 20 74 68 65 20 73 71 | index o|f the sq|
|00004070| 75 61 72 65 20 70 6f 69 | 6e 74 20 69 73 20 6f 6e |uare poi|nt is on|
|00004080| 2c 20 6f 72 20 6e 69 6c | 20 69 66 20 6e 6f 74 20 |, or nil| if not |
|00004090| 6f 6e 20 74 68 65 20 62 | 6f 61 72 64 2e 22 5d 29 |on the b|oard."])|
|000040a0| 0a 28 66 73 65 74 20 27 | 67 6f 6d 6f 6b 75 2d 67 |.(fset '|gomoku-g|
|000040b0| 6f 74 6f 2d 73 71 75 61 | 72 65 20 23 5b 28 69 6e |oto-squa|re #[(in|
|000040c0| 64 65 78 29 20 22 c0 c1 | 5c 6e 21 c3 5c 6e 21 5c |dex) "..|\n!.\n!\|
|000040d0| 22 87 22 20 5b 67 6f 6d | 6f 6b 75 2d 67 6f 74 6f |"." [gom|oku-goto|
|000040e0| 2d 78 79 20 67 6f 6d 6f | 6b 75 2d 69 6e 64 65 78 |-xy gomo|ku-index|
|000040f0| 2d 74 6f 2d 78 20 69 6e | 64 65 78 20 67 6f 6d 6f |-to-x in|dex gomo|
|00004100| 6b 75 2d 69 6e 64 65 78 | 2d 74 6f 2d 79 5d 20 34 |ku-index|-to-y] 4|
|00004110| 20 22 5c 0a 4d 6f 76 65 | 20 70 6f 69 6e 74 20 74 | "\.Move| point t|
|00004120| 6f 20 73 71 75 61 72 65 | 20 6e 75 6d 62 65 72 20 |o square| number |
|00004130| 49 4e 44 45 58 2e 22 5d | 29 0a 28 66 73 65 74 20 |INDEX."]|).(fset |
|00004140| 27 67 6f 6d 6f 6b 75 2d | 67 6f 74 6f 2d 78 79 20 |'gomoku-|goto-xy |
|00004150| 23 5b 28 78 20 79 29 20 | 22 c0 09 5c 6e 0b 53 5f |#[(x y) |"..\n.S_|
|00004160| c4 5c 5c 5c 5c 21 88 c5 | 0e 06 0e 07 0e 08 53 5f |.\\\\!..|......S_|
|00004170| 5c 5c 21 87 22 20 5b 67 | 6f 74 6f 2d 6c 69 6e 65 |\\!." [g|oto-line|
|00004180| 20 67 6f 6d 6f 6b 75 2d | 79 2d 6f 66 66 73 65 74 | gomoku-|y-offset|
|00004190| 20 67 6f 6d 6f 6b 75 2d | 73 71 75 61 72 65 2d 68 | gomoku-|square-h|
|000041a0| 65 69 67 68 74 20 79 20 | 31 20 6d 6f 76 65 2d 74 |eight y |1 move-t|
|000041b0| 6f 2d 63 6f 6c 75 6d 6e | 20 67 6f 6d 6f 6b 75 2d |o-column| gomoku-|
|000041c0| 78 2d 6f 66 66 73 65 74 | 20 67 6f 6d 6f 6b 75 2d |x-offset| gomoku-|
|000041d0| 73 71 75 61 72 65 2d 77 | 69 64 74 68 20 78 5d 20 |square-w|idth x] |
|000041e0| 34 20 22 5c 0a 4d 6f 76 | 65 20 70 6f 69 6e 74 20 |4 "\.Mov|e point |
|000041f0| 74 6f 20 73 71 75 61 72 | 65 20 61 74 20 58 2c 20 |to squar|e at X, |
|00004200| 59 20 63 6f 6f 72 64 73 | 2e 22 5d 29 0a 28 66 73 |Y coords|."]).(fs|
|00004210| 65 74 20 27 67 6f 6d 6f | 6b 75 2d 70 6c 6f 74 2d |et 'gomo|ku-plot-|
|00004220| 73 71 75 61 72 65 20 23 | 5b 28 73 71 75 61 72 65 |square #|[(square|
|00004230| 20 76 61 6c 75 65 29 20 | 22 c0 09 21 88 c2 0b c4 | value) |"..!....|
|00004240| 55 ab 83 c5 aa 89 0b c6 | 55 ab 83 c7 aa 81 c8 21 |U.......|U......!|
|00004250| 88 c9 ca 21 87 22 20 5b | 67 6f 6d 6f 6b 75 2d 67 |...!." [|gomoku-g|
|00004260| 6f 74 6f 2d 73 71 75 61 | 72 65 20 73 71 75 61 72 |oto-squa|re squar|
|00004270| 65 20 67 6f 6d 6f 6b 75 | 2d 70 75 74 2d 63 68 61 |e gomoku|-put-cha|
|00004280| 72 20 76 61 6c 75 65 20 | 31 20 38 38 20 36 20 37 |r value |1 88 6 7|
|00004290| 39 20 34 36 20 73 69 74 | 2d 66 6f 72 20 30 5d 20 |9 46 sit|-for 0] |
|000042a0| 33 20 22 5c 0a 44 72 61 | 77 20 27 58 27 2c 20 27 |3 "\.Dra|w 'X', '|
|000042b0| 4f 27 20 6f 72 20 27 2e | 27 20 6f 6e 20 53 51 55 |O' or '.|' on SQU|
|000042c0| 41 52 45 20 28 64 65 70 | 65 6e 64 69 6e 67 20 6f |ARE (dep|ending o|
|000042d0| 6e 20 56 41 4c 55 45 29 | 2c 20 6c 65 61 76 65 20 |n VALUE)|, leave |
|000042e0| 70 6f 69 6e 74 20 74 68 | 65 72 65 2e 22 5d 29 0a |point th|ere."]).|
|000042f0| 28 66 73 65 74 20 27 67 | 6f 6d 6f 6b 75 2d 70 75 |(fset 'g|omoku-pu|
|00004300| 74 2d 63 68 61 72 20 23 | 5b 28 63 68 61 72 29 20 |t-char #|[(char) |
|00004310| 22 08 ab 83 c1 20 88 5c | 6e 63 88 c3 c4 21 88 c5 |".... .\|nc...!..|
|00004320| c4 21 88 c1 20 87 22 20 | 5b 62 75 66 66 65 72 2d |.!.. ." |[buffer-|
|00004330| 72 65 61 64 2d 6f 6e 6c | 79 20 74 6f 67 67 6c 65 |read-onl|y toggle|
|00004340| 2d 72 65 61 64 2d 6f 6e | 6c 79 20 63 68 61 72 20 |-read-on|ly char |
|00004350| 64 65 6c 65 74 65 2d 63 | 68 61 72 20 31 20 62 61 |delete-c|har 1 ba|
|00004360| 63 6b 77 61 72 64 2d 63 | 68 61 72 5d 20 32 20 22 |ckward-c|har] 2 "|
|00004370| 5c 0a 44 72 61 77 20 43 | 48 41 52 20 6f 6e 20 74 |\.Draw C|HAR on t|
|00004380| 68 65 20 47 6f 6d 6f 6b | 75 20 73 63 72 65 65 6e |he Gomok|u screen|
|00004390| 2e 22 5d 29 0a 28 66 73 | 65 74 20 27 67 6f 6d 6f |."]).(fs|et 'gomo|
|000043a0| 6b 75 2d 69 6e 69 74 2d | 64 69 73 70 6c 61 79 20 |ku-init-|display |
|000043b0| 23 5b 28 6e 20 6d 29 20 | 22 c0 70 21 88 09 ab 83 |#[(n m) |".p!....|
|000043c0| c2 20 88 c3 20 88 c4 89 | 89 89 1d 1e 06 1e 07 1e |. .. ...|........|
|000043d0| 08 c9 0e 5c 6e 53 cb 5c | 22 cc 50 16 08 cd ce cf |...\nS.\|".P.....|
|000043e0| 0e 10 53 0e 08 5c 22 5c | 22 16 08 c9 0e 11 cb 5c |..S..\"\|"......\|
|000043f0| 22 cc 0e 08 d2 52 16 08 | c9 0e 11 0e 10 53 0e 5c |"....R..|.....S.\|
|00004400| 6e 5f d3 5c 5c 5c 5c cb | 5c 22 89 16 07 d2 50 16 |n_.\\\\.|\"....P.|
|00004410| 07 cd ce cf 0e 14 53 0e | 07 5c 22 5c 22 89 16 06 |......S.|.\"\"...|
|00004420| 0e 08 50 16 06 cd ce cf | 0e 15 53 0e 06 5c 22 5c |..P.....|..S..\"\|
|00004430| 22 16 06 cd ce cf 0e 16 | 0e 07 5c 22 5c 22 89 15 |".......|..\"\"..|
|00004440| 0e 08 0e 06 b1 03 88 2c | c2 20 88 d7 0e 10 54 d8 |.......,|. ....T.|
|00004450| a5 0e 15 54 d8 a5 5c 22 | 88 d9 da 21 87 22 20 5b |...T..\"|...!." [|
|00004460| 62 75 66 66 65 72 2d 64 | 69 73 61 62 6c 65 2d 75 |buffer-d|isable-u|
|00004470| 6e 64 6f 20 62 75 66 66 | 65 72 2d 72 65 61 64 2d |ndo buff|er-read-|
|00004480| 6f 6e 6c 79 20 74 6f 67 | 67 6c 65 2d 72 65 61 64 |only tog|gle-read|
|00004490| 2d 6f 6e 6c 79 20 65 72 | 61 73 65 2d 62 75 66 66 |-only er|ase-buff|
|000044a0| 65 72 20 6e 69 6c 20 73 | 74 72 69 6e 67 34 20 73 |er nil s|tring4 s|
|000044b0| 74 72 69 6e 67 33 20 73 | 74 72 69 6e 67 32 20 73 |tring3 s|tring2 s|
|000044c0| 74 72 69 6e 67 31 20 6d | 61 6b 65 2d 73 74 72 69 |tring1 m|ake-stri|
|000044d0| 6e 67 20 67 6f 6d 6f 6b | 75 2d 73 71 75 61 72 65 |ng gomok|u-square|
|000044e0| 2d 77 69 64 74 68 20 33 | 32 20 22 2e 22 20 61 70 |-width 3|2 "." ap|
|000044f0| 70 6c 79 20 63 6f 6e 63 | 61 74 20 6d 61 6b 65 2d |ply conc|at make-|
|00004500| 6c 69 73 74 20 6e 20 67 | 6f 6d 6f 6b 75 2d 78 2d |list n g|omoku-x-|
|00004510| 6f 66 66 73 65 74 20 22 | 5c 6e 22 20 31 20 67 6f |offset "|\n" 1 go|
|00004520| 6d 6f 6b 75 2d 73 71 75 | 61 72 65 2d 68 65 69 67 |moku-squ|are-heig|
|00004530| 68 74 20 6d 20 67 6f 6d | 6f 6b 75 2d 79 2d 6f 66 |ht m gom|oku-y-of|
|00004540| 66 73 65 74 20 67 6f 6d | 6f 6b 75 2d 67 6f 74 6f |fset gom|oku-goto|
|00004550| 2d 78 79 20 32 20 73 69 | 74 2d 66 6f 72 20 30 5d |-xy 2 si|t-for 0]|
|00004560| 20 36 20 22 5c 0a 44 69 | 73 70 6c 61 79 20 61 6e | 6 "\.Di|splay an|
|00004570| 20 4e 20 62 79 20 4d 20 | 47 6f 6d 6f 6b 75 20 62 | N by M |Gomoku b|
|00004580| 6f 61 72 64 2e 22 5d 29 | 0a 28 66 73 65 74 20 27 |oard."])|.(fset '|
|00004590| 67 6f 6d 6f 6b 75 2d 64 | 69 73 70 6c 61 79 2d 73 |gomoku-d|isplay-s|
|000045a0| 74 61 74 69 73 74 69 63 | 73 20 23 5b 6e 69 6c 20 |tatistic|s #[nil |
|000045b0| 22 08 c1 55 ac 88 c2 c3 | 0c 0d 08 24 aa a0 0d c1 |"..U....|...$....|
|000045c0| 55 ac 87 c2 c6 0c 0d 23 | aa 94 0c c1 55 ab 83 c7 |U......#|....U...|
|000045d0| aa 8c 0c c8 55 ab 83 c9 | aa 84 c2 ca 0c 5c 22 16 |....U...|.....\".|
|000045e0| 0b cc cd 20 21 87 22 20 | 5b 67 6f 6d 6f 6b 75 2d |... !." |[gomoku-|
|000045f0| 6e 75 6d 62 65 72 2d 6f | 66 2d 64 72 61 77 73 20 |number-o|f-draws |
|00004600| 30 20 66 6f 72 6d 61 74 | 20 22 3a 20 57 6f 6e 20 |0 format| ": Won |
|00004610| 25 64 2c 20 6c 6f 73 74 | 20 25 64 2c 20 64 72 65 |%d, lost| %d, dre|
|00004620| 77 20 25 64 22 20 67 6f | 6d 6f 6b 75 2d 6e 75 6d |w %d" go|moku-num|
|00004630| 62 65 72 2d 6f 66 2d 77 | 69 6e 73 20 67 6f 6d 6f |ber-of-w|ins gomo|
|00004640| 6b 75 2d 6e 75 6d 62 65 | 72 2d 6f 66 2d 6c 6f 73 |ku-numbe|r-of-los|
|00004650| 73 65 73 20 22 3a 20 57 | 6f 6e 20 25 64 2c 20 6c |ses ": W|on %d, l|
|00004660| 6f 73 74 20 25 64 22 20 | 22 22 20 31 20 22 3a 20 |ost %d" |"" 1 ": |
|00004670| 41 6c 72 65 61 64 79 20 | 77 6f 6e 20 6f 6e 65 22 |Already |won one"|
|00004680| 20 22 3a 20 57 6f 6e 20 | 25 64 20 69 6e 20 61 20 | ": Won |%d in a |
|00004690| 72 6f 77 22 20 6d 6f 64 | 65 2d 6c 69 6e 65 2d 70 |row" mod|e-line-p|
|000046a0| 72 6f 63 65 73 73 20 73 | 65 74 2d 62 75 66 66 65 |rocess s|et-buffe|
|000046b0| 72 2d 6d 6f 64 69 66 69 | 65 64 2d 70 20 62 75 66 |r-modifi|ed-p buf|
|000046c0| 66 65 72 2d 6d 6f 64 69 | 66 69 65 64 2d 70 5d 20 |fer-modi|fied-p] |
|000046d0| 35 20 22 5c 0a 4f 62 6e | 6f 78 69 6f 75 73 6c 79 |5 "\.Obn|oxiously|
|000046e0| 20 64 69 73 70 6c 61 79 | 20 73 6f 6d 65 20 73 74 | display| some st|
|000046f0| 61 74 69 73 74 69 63 73 | 20 61 62 6f 75 74 20 70 |atistics| about p|
|00004700| 72 65 76 69 6f 75 73 20 | 67 61 6d 65 73 20 69 6e |revious |games in|
|00004710| 20 6d 6f 64 65 20 6c 69 | 6e 65 2e 22 5d 29 0a 28 | mode li|ne."]).(|
|00004720| 66 73 65 74 20 27 67 6f | 6d 6f 6b 75 2d 73 77 69 |fset 'go|moku-swi|
|00004730| 74 63 68 2d 74 6f 2d 77 | 69 6e 64 6f 77 20 23 5b |tch-to-w|indow #[|
|00004740| 6e 69 6c 20 22 c0 c1 21 | 89 1a ab 85 c3 5c 6e 21 |nil "..!|.....\n!|
|00004750| aa 8c 0c ab 83 c5 20 88 | c3 c1 21 88 c6 20 29 87 |...... .|..!.. ).|
|00004760| 22 20 5b 67 65 74 2d 62 | 75 66 66 65 72 20 22 2a |" [get-b|uffer "*|
|00004770| 47 6f 6d 6f 6b 75 2a 22 | 20 62 75 66 66 20 73 77 |Gomoku*"| buff sw|
|00004780| 69 74 63 68 2d 74 6f 2d | 62 75 66 66 65 72 20 67 |itch-to-|buffer g|
|00004790| 6f 6d 6f 6b 75 2d 67 61 | 6d 65 2d 69 6e 2d 70 72 |omoku-ga|me-in-pr|
|000047a0| 6f 67 72 65 73 73 20 67 | 6f 6d 6f 6b 75 2d 63 72 |ogress g|omoku-cr|
|000047b0| 61 73 68 2d 67 61 6d 65 | 20 67 6f 6d 6f 6b 75 2d |ash-game| gomoku-|
|000047c0| 6d 6f 64 65 5d 20 33 20 | 22 5c 0a 46 69 6e 64 20 |mode] 3 |"\.Find |
|000047d0| 6f 72 20 63 72 65 61 74 | 65 20 74 68 65 20 47 6f |or creat|e the Go|
|000047e0| 6d 6f 6b 75 20 62 75 66 | 66 65 72 2c 20 61 6e 64 |moku buf|fer, and|
|000047f0| 20 64 69 73 70 6c 61 79 | 20 69 74 2e 22 20 6e 69 | display| it." ni|
|00004800| 6c 5d 29 0a 28 64 65 66 | 76 61 72 20 67 6f 6d 6f |l]).(def|var gomo|
|00004810| 6b 75 2d 77 69 6e 6e 69 | 6e 67 2d 71 74 75 70 6c |ku-winni|ng-qtupl|
|00004820| 65 2d 62 65 67 20 6e 69 | 6c 20 22 5c 0a 46 69 72 |e-beg ni|l "\.Fir|
|00004830| 73 74 20 73 71 75 61 72 | 65 20 6f 66 20 74 68 65 |st squar|e of the|
|00004840| 20 77 69 6e 6e 69 6e 67 | 20 71 74 75 70 6c 65 2e | winning| qtuple.|
|00004850| 22 29 0a 28 64 65 66 76 | 61 72 20 67 6f 6d 6f 6b |").(defv|ar gomok|
|00004860| 75 2d 77 69 6e 6e 69 6e | 67 2d 71 74 75 70 6c 65 |u-winnin|g-qtuple|
|00004870| 2d 65 6e 64 20 6e 69 6c | 20 22 5c 0a 4c 61 73 74 |-end nil| "\.Last|
|00004880| 20 73 71 75 61 72 65 20 | 6f 66 20 74 68 65 20 77 | square |of the w|
|00004890| 69 6e 6e 69 6e 67 20 71 | 74 75 70 6c 65 2e 22 29 |inning q|tuple.")|
|000048a0| 0a 28 64 65 66 76 61 72 | 20 67 6f 6d 6f 6b 75 2d |.(defvar| gomoku-|
|000048b0| 77 69 6e 6e 69 6e 67 2d | 71 74 75 70 6c 65 2d 64 |winning-|qtuple-d|
|000048c0| 78 20 6e 69 6c 20 22 5c | 0a 44 69 72 65 63 74 69 |x nil "\|.Directi|
|000048d0| 6f 6e 20 6f 66 20 74 68 | 65 20 77 69 6e 6e 69 6e |on of th|e winnin|
|000048e0| 67 20 71 74 75 70 6c 65 | 20 28 61 6c 6f 6e 67 20 |g qtuple| (along |
|000048f0| 74 68 65 20 58 20 61 78 | 69 73 29 2e 22 29 0a 28 |the X ax|is).").(|
|00004900| 64 65 66 76 61 72 20 67 | 6f 6d 6f 6b 75 2d 77 69 |defvar g|omoku-wi|
|00004910| 6e 6e 69 6e 67 2d 71 74 | 75 70 6c 65 2d 64 79 20 |nning-qt|uple-dy |
|00004920| 6e 69 6c 20 22 5c 0a 44 | 69 72 65 63 74 69 6f 6e |nil "\.D|irection|
|00004930| 20 6f 66 20 74 68 65 20 | 77 69 6e 6e 69 6e 67 20 | of the |winning |
|00004940| 71 74 75 70 6c 65 20 28 | 61 6c 6f 6e 67 20 74 68 |qtuple (|along th|
|00004950| 65 20 59 20 61 78 69 73 | 29 2e 22 29 0a 28 66 73 |e Y axis|).").(fs|
|00004960| 65 74 20 27 67 6f 6d 6f | 6b 75 2d 66 69 6e 64 2d |et 'gomo|ku-find-|
|00004970| 66 69 6c 6c 65 64 2d 71 | 74 75 70 6c 65 20 23 5b |filled-q|tuple #[|
|00004980| 28 73 71 75 61 72 65 20 | 76 61 6c 75 65 29 20 22 |(square |value) "|
|00004990| c0 09 5c 6e c3 c4 24 ae | 96 c0 09 5c 6e c4 c3 24 |..\n..$.|...\n..$|
|000049a0| ae 8e c0 09 5c 6e c3 89 | 24 ae 86 c0 09 5c 6e c5 |....\n..|$....\n.|
|000049b0| c3 24 87 22 20 5b 67 6f | 6d 6f 6b 75 2d 63 68 65 |.$." [go|moku-che|
|000049c0| 63 6b 2d 66 69 6c 6c 65 | 64 2d 71 74 75 70 6c 65 |ck-fille|d-qtuple|
|000049d0| 20 73 71 75 61 72 65 20 | 76 61 6c 75 65 20 31 20 | square |value 1 |
|000049e0| 30 20 2d 31 5d 20 35 20 | 22 5c 0a 52 65 74 75 72 |0 -1] 5 |"\.Retur|
|000049f0| 6e 20 54 20 69 66 20 53 | 51 55 41 52 45 20 62 65 |n T if S|QUARE be|
|00004a00| 6c 6f 6e 67 73 20 74 6f | 20 61 20 71 74 75 70 6c |longs to| a qtupl|
|00004a10| 65 20 66 69 6c 6c 65 64 | 20 77 69 74 68 20 56 41 |e filled| with VA|
|00004a20| 4c 55 45 73 2e 22 5d 29 | 0a 28 66 73 65 74 20 27 |LUEs."])|.(fset '|
|00004a30| 67 6f 6d 6f 6b 75 2d 63 | 68 65 63 6b 2d 66 69 6c |gomoku-c|heck-fil|
|00004a40| 6c 65 64 2d 71 74 75 70 | 6c 65 20 23 5b 28 73 71 |led-qtup|le #[(sq|
|00004a50| 75 61 72 65 20 76 61 6c | 75 65 20 64 78 20 64 79 |uare val|ue dx dy|
|00004a60| 29 20 22 c0 89 09 89 c2 | 0b 0c 5c 22 c5 1e 06 1e |) ".....|..\"....|
|00004a70| 07 1e 08 1e 09 1e 5c 6e | 89 1e 0b cc 56 ab 98 0e |......\n|....V...|
|00004a80| 0d 0e 0e 0e 09 0e 07 5a | 89 16 09 48 55 ab 88 0e |.......Z|...HU...|
|00004a90| 0b 53 89 16 0b aa 64 0e | 0b cf 5c 5c 16 06 0e 5c |.S....d.|..\\...\|
|00004aa0| 6e 0e 06 57 ab 98 0e 0d | 0e 0e 0e 08 0e 07 5c 5c |n..W....|......\\|
|00004ab0| 89 16 08 48 55 ab 88 0e | 5c 6e 54 89 16 5c 6e aa |...HU...|\nT..\n.|
|00004ac0| 63 0e 5c 6e 0e 06 55 ad | 99 09 0e 0b 0e 07 5f 5c |c.\n..U.|......_\|
|00004ad0| 5c 16 10 09 0e 5c 6e 0e | 07 5f 5c 5c 16 11 0b 16 |\....\n.|._\\....|
|00004ae0| 12 0c 16 13 d4 2e 06 87 | 22 20 5b 30 20 73 71 75 |........|" [0 squ|
|00004af0| 61 72 65 20 67 6f 6d 6f | 6b 75 2d 78 79 2d 74 6f |are gomo|ku-xy-to|
|00004b00| 2d 69 6e 64 65 78 20 64 | 78 20 64 79 20 6e 69 6c |-index d|x dy nil|
|00004b10| 20 61 2b 34 20 64 65 70 | 6c 20 72 69 67 68 74 20 | a+4 dep|l right |
|00004b20| 6c 65 66 74 20 62 20 61 | 20 2d 34 20 76 61 6c 75 |left b a| -4 valu|
|00004b30| 65 20 67 6f 6d 6f 6b 75 | 2d 62 6f 61 72 64 20 34 |e gomoku|-board 4|
|00004b40| 20 67 6f 6d 6f 6b 75 2d | 77 69 6e 6e 69 6e 67 2d | gomoku-|winning-|
|00004b50| 71 74 75 70 6c 65 2d 62 | 65 67 20 67 6f 6d 6f 6b |qtuple-b|eg gomok|
|00004b60| 75 2d 77 69 6e 6e 69 6e | 67 2d 71 74 75 70 6c 65 |u-winnin|g-qtuple|
|00004b70| 2d 65 6e 64 20 67 6f 6d | 6f 6b 75 2d 77 69 6e 6e |-end gom|oku-winn|
|00004b80| 69 6e 67 2d 71 74 75 70 | 6c 65 2d 64 78 20 67 6f |ing-qtup|le-dx go|
|00004b90| 6d 6f 6b 75 2d 77 69 6e | 6e 69 6e 67 2d 71 74 75 |moku-win|ning-qtu|
|00004ba0| 70 6c 65 2d 64 79 20 74 | 5d 20 38 20 22 5c 0a 52 |ple-dy t|] 8 "\.R|
|00004bb0| 65 74 75 72 6e 20 54 20 | 69 66 20 53 51 55 41 52 |eturn T |if SQUAR|
|00004bc0| 45 20 62 65 6c 6f 6e 67 | 73 20 74 6f 20 61 20 71 |E belong|s to a q|
|00004bd0| 74 75 70 6c 65 20 66 69 | 6c 6c 65 64 20 20 77 69 |tuple fi|lled wi|
|00004be0| 74 68 20 56 41 4c 55 45 | 73 20 61 6c 6f 6e 67 20 |th VALUE|s along |
|00004bf0| 44 58 2c 20 44 59 2e 22 | 5d 29 0a 28 66 73 65 74 |DX, DY."|]).(fset|
|00004c00| 20 27 67 6f 6d 6f 6b 75 | 2d 63 72 6f 73 73 2d 77 | 'gomoku|-cross-w|
|00004c10| 69 6e 6e 69 6e 67 2d 71 | 74 75 70 6c 65 20 23 5b |inning-q|tuple #[|
|00004c20| 6e 69 6c 20 22 c0 09 5c | 6e 0b 0c 24 87 22 20 5b |nil "..\|n..$." [|
|00004c30| 67 6f 6d 6f 6b 75 2d 63 | 72 6f 73 73 2d 71 74 75 |gomoku-c|ross-qtu|
|00004c40| 70 6c 65 20 67 6f 6d 6f | 6b 75 2d 77 69 6e 6e 69 |ple gomo|ku-winni|
|00004c50| 6e 67 2d 71 74 75 70 6c | 65 2d 62 65 67 20 67 6f |ng-qtupl|e-beg go|
|00004c60| 6d 6f 6b 75 2d 77 69 6e | 6e 69 6e 67 2d 71 74 75 |moku-win|ning-qtu|
|00004c70| 70 6c 65 2d 65 6e 64 20 | 67 6f 6d 6f 6b 75 2d 77 |ple-end |gomoku-w|
|00004c80| 69 6e 6e 69 6e 67 2d 71 | 74 75 70 6c 65 2d 64 78 |inning-q|tuple-dx|
|00004c90| 20 67 6f 6d 6f 6b 75 2d | 77 69 6e 6e 69 6e 67 2d | gomoku-|winning-|
|00004ca0| 71 74 75 70 6c 65 2d 64 | 79 5d 20 35 20 22 5c 0a |qtuple-d|y] 5 "\.|
|00004cb0| 43 72 6f 73 73 20 77 69 | 6e 6e 69 6e 67 20 71 74 |Cross wi|nning qt|
|00004cc0| 75 70 6c 65 2c 20 61 73 | 20 66 6f 75 6e 64 20 62 |uple, as| found b|
|00004cd0| 79 20 67 6f 6d 6f 6b 75 | 2d 66 69 6e 64 2d 66 69 |y gomoku|-find-fi|
|00004ce0| 6c 6c 65 64 2d 71 74 75 | 70 6c 65 2e 22 5d 29 0a |lled-qtu|ple."]).|
|00004cf0| 28 66 73 65 74 20 27 67 | 6f 6d 6f 6b 75 2d 63 72 |(fset 'g|omoku-cr|
|00004d00| 6f 73 73 2d 71 74 75 70 | 6c 65 20 23 5b 28 73 71 |oss-qtup|le #[(sq|
|00004d10| 75 61 72 65 31 20 73 71 | 75 61 72 65 32 20 64 78 |uare1 sq|uare2 dx|
|00004d20| 20 64 79 29 20 22 8a c0 | 09 5c 6e 5c 22 1b 0c 0d | dy) "..|.\n\"...|
|00004d30| 55 84 9c 00 c6 0c 21 88 | 0c 0b 5c 5c 14 09 c7 55 |U.....!.|..\\...U|
|00004d40| ab a0 5c 6e c8 55 ab 9b | c7 1e 09 0e 09 0e 5c 6e |..\n.U..|......\n|
|00004d50| 57 ab 8e 0e 09 54 16 09 | c7 75 88 cb cc 21 88 aa |W....T..|.u...!..|
|00004d60| 6b 29 aa 4d 09 c8 55 ab | a1 5c 6e c7 55 ab 9c c7 |k).M..U.|.\n.U...|
|00004d70| 1e 09 0e 09 0e 0d 57 ab | 8f 0e 09 54 16 09 ce c7 |......W.|...T....|
|00004d80| 21 88 cb cf 21 88 aa 6a | 29 aa 27 09 d0 55 ab 99 |!...!..j|).'..U..|
|00004d90| 5c 6e c7 55 ab 94 d1 0e | 5c 6e d2 a5 21 88 ce 0e |\n.U....|\n..!...|
|00004da0| 0d d2 a5 21 88 cb d3 21 | 88 aa 09 09 c7 55 ab 04 |...!...!|.....U..|
|00004db0| 5c 6e c7 55 83 06 00 0e | 5c 6e d2 a5 75 88 ce 0e |\n.U....|\n..u...|
|00004dc0| 0d d2 a5 21 88 cb d4 21 | 88 82 06 00 2a d5 c8 21 |...!...!|....*..!|
|00004dd0| 87 22 20 5b 67 6f 6d 6f | 6b 75 2d 78 79 2d 74 6f |." [gomo|ku-xy-to|
|00004de0| 2d 69 6e 64 65 78 20 64 | 78 20 64 79 20 64 65 70 |-index d|x dy dep|
|00004df0| 6c 20 73 71 75 61 72 65 | 31 20 73 71 75 61 72 65 |l square|1 square|
|00004e00| 32 20 67 6f 6d 6f 6b 75 | 2d 67 6f 74 6f 2d 73 71 |2 gomoku|-goto-sq|
|00004e10| 75 61 72 65 20 31 20 30 | 20 6e 20 67 6f 6d 6f 6b |uare 1 0| n gomok|
|00004e20| 75 2d 73 71 75 61 72 65 | 2d 77 69 64 74 68 20 67 |u-square|-width g|
|00004e30| 6f 6d 6f 6b 75 2d 70 75 | 74 2d 63 68 61 72 20 34 |omoku-pu|t-char 4|
|00004e40| 35 20 67 6f 6d 6f 6b 75 | 2d 73 71 75 61 72 65 2d |5 gomoku|-square-|
|00004e50| 68 65 69 67 68 74 20 6e | 65 78 74 2d 6c 69 6e 65 |height n|ext-line|
|00004e60| 20 31 32 34 20 2d 31 20 | 62 61 63 6b 77 61 72 64 | 124 -1 |backward|
|00004e70| 2d 63 68 61 72 20 32 20 | 34 37 20 39 32 20 73 69 |-char 2 |47 92 si|
|00004e80| 74 2d 66 6f 72 5d 20 33 | 20 22 5c 0a 43 72 6f 73 |t-for] 3| "\.Cros|
|00004e90| 73 20 65 76 65 72 79 20 | 73 71 75 61 72 65 20 62 |s every |square b|
|00004ea0| 65 74 77 65 65 6e 20 53 | 51 55 41 52 45 31 20 61 |etween S|QUARE1 a|
|00004eb0| 6e 64 20 53 51 55 41 52 | 45 32 20 69 6e 20 74 68 |nd SQUAR|E2 in th|
|00004ec0| 65 20 44 58 2c 20 44 59 | 20 64 69 72 65 63 74 69 |e DX, DY| directi|
|00004ed0| 6f 6e 2e 22 5d 29 0a 28 | 66 73 65 74 20 27 67 6f |on."]).(|fset 'go|
|00004ee0| 6d 6f 6b 75 2d 6d 6f 76 | 65 2d 6c 65 66 74 20 23 |moku-mov|e-left #|
|00004ef0| 5b 6e 69 6c 20 22 c0 20 | 19 c2 09 ac 83 c3 aa 89 |[nil ". |........|
|00004f00| 09 c3 56 ab 83 0c aa 81 | c5 21 29 87 22 20 5b 67 |..V.....|.!)." [g|
|00004f10| 6f 6d 6f 6b 75 2d 70 6f | 69 6e 74 2d 78 20 78 20 |omoku-po|int-x x |
|00004f20| 62 61 63 6b 77 61 72 64 | 2d 63 68 61 72 20 31 20 |backward|-char 1 |
|00004f30| 67 6f 6d 6f 6b 75 2d 73 | 71 75 61 72 65 2d 77 69 |gomoku-s|quare-wi|
|00004f40| 64 74 68 20 30 5d 20 33 | 20 22 5c 0a 4d 6f 76 65 |dth 0] 3| "\.Move|
|00004f50| 20 70 6f 69 6e 74 20 62 | 61 63 6b 77 61 72 64 20 | point b|ackward |
|00004f60| 6f 6e 65 20 63 6f 6c 75 | 6d 6e 20 6f 6e 20 74 68 |one colu|mn on th|
|00004f70| 65 20 47 6f 6d 6f 6b 75 | 20 62 6f 61 72 64 2e 22 |e Gomoku| board."|
|00004f80| 20 6e 69 6c 5d 29 0a 28 | 66 73 65 74 20 27 67 6f | nil]).(|fset 'go|
|00004f90| 6d 6f 6b 75 2d 6d 6f 76 | 65 2d 72 69 67 68 74 20 |moku-mov|e-right |
|00004fa0| 23 5b 6e 69 6c 20 22 c0 | 20 89 19 ac 83 c2 aa 89 |#[nil ".| .......|
|00004fb0| 09 0b 57 ab 83 0c aa 81 | c5 75 29 87 22 20 5b 67 |..W.....|.u)." [g|
|00004fc0| 6f 6d 6f 6b 75 2d 70 6f | 69 6e 74 2d 78 20 78 20 |omoku-po|int-x x |
|00004fd0| 31 20 67 6f 6d 6f 6b 75 | 2d 62 6f 61 72 64 2d 77 |1 gomoku|-board-w|
|00004fe0| 69 64 74 68 20 67 6f 6d | 6f 6b 75 2d 73 71 75 61 |idth gom|oku-squa|
|00004ff0| 72 65 2d 77 69 64 74 68 | 20 30 5d 20 33 20 22 5c |re-width| 0] 3 "\|
|00005000| 0a 4d 6f 76 65 20 70 6f | 69 6e 74 20 66 6f 72 77 |.Move po|int forw|
|00005010| 61 72 64 20 6f 6e 65 20 | 63 6f 6c 75 6d 6e 20 6f |ard one |column o|
|00005020| 6e 20 74 68 65 20 47 6f | 6d 6f 6b 75 20 62 6f 61 |n the Go|moku boa|
|00005030| 72 64 2e 22 20 6e 69 6c | 5d 29 0a 28 66 73 65 74 |rd." nil|]).(fset|
|00005040| 20 27 67 6f 6d 6f 6b 75 | 2d 6d 6f 76 65 2d 64 6f | 'gomoku|-move-do|
|00005050| 77 6e 20 23 5b 6e 69 6c | 20 22 c0 20 19 c2 09 ac |wn #[nil| ". ....|
|00005060| 83 c3 aa 89 09 0c 57 ab | 83 0d aa 81 c6 21 29 87 |......W.|.....!).|
|00005070| 22 20 5b 67 6f 6d 6f 6b | 75 2d 70 6f 69 6e 74 2d |" [gomok|u-point-|
|00005080| 79 20 79 20 6e 65 78 74 | 2d 6c 69 6e 65 20 31 20 |y y next|-line 1 |
|00005090| 67 6f 6d 6f 6b 75 2d 62 | 6f 61 72 64 2d 68 65 69 |gomoku-b|oard-hei|
|000050a0| 67 68 74 20 67 6f 6d 6f | 6b 75 2d 73 71 75 61 72 |ght gomo|ku-squar|
|000050b0| 65 2d 68 65 69 67 68 74 | 20 30 5d 20 33 20 22 5c |e-height| 0] 3 "\|
|000050c0| 0a 4d 6f 76 65 20 70 6f | 69 6e 74 20 64 6f 77 6e |.Move po|int down|
|000050d0| 20 6f 6e 65 20 72 6f 77 | 20 6f 6e 20 74 68 65 20 | one row| on the |
|000050e0| 47 6f 6d 6f 6b 75 20 62 | 6f 61 72 64 2e 22 20 6e |Gomoku b|oard." n|
|000050f0| 69 6c 5d 29 0a 28 66 73 | 65 74 20 27 67 6f 6d 6f |il]).(fs|et 'gomo|
|00005100| 6b 75 2d 6d 6f 76 65 2d | 75 70 20 23 5b 6e 69 6c |ku-move-|up #[nil|
|00005110| 20 22 c0 20 19 c2 09 ac | 83 c3 aa 89 09 c3 56 ab | ". ....|......V.|
|00005120| 83 0c aa 81 c5 21 29 87 | 22 20 5b 67 6f 6d 6f 6b |.....!).|" [gomok|
|00005130| 75 2d 70 6f 69 6e 74 2d | 79 20 79 20 70 72 65 76 |u-point-|y y prev|
|00005140| 69 6f 75 73 2d 6c 69 6e | 65 20 31 20 67 6f 6d 6f |ious-lin|e 1 gomo|
|00005150| 6b 75 2d 73 71 75 61 72 | 65 2d 68 65 69 67 68 74 |ku-squar|e-height|
|00005160| 20 30 5d 20 33 20 22 5c | 0a 4d 6f 76 65 20 70 6f | 0] 3 "\|.Move po|
|00005170| 69 6e 74 20 75 70 20 6f | 6e 65 20 72 6f 77 20 6f |int up o|ne row o|
|00005180| 6e 20 74 68 65 20 47 6f | 6d 6f 6b 75 20 62 6f 61 |n the Go|moku boa|
|00005190| 72 64 2e 22 20 6e 69 6c | 5d 29 0a 28 66 73 65 74 |rd." nil|]).(fset|
|000051a0| 20 27 67 6f 6d 6f 6b 75 | 2d 6d 6f 76 65 2d 6e 65 | 'gomoku|-move-ne|
|000051b0| 20 23 5b 6e 69 6c 20 22 | c0 20 88 c1 20 87 22 20 | #[nil "|. .. ." |
|000051c0| 5b 67 6f 6d 6f 6b 75 2d | 6d 6f 76 65 2d 75 70 20 |[gomoku-|move-up |
|000051d0| 67 6f 6d 6f 6b 75 2d 6d | 6f 76 65 2d 72 69 67 68 |gomoku-m|ove-righ|
|000051e0| 74 5d 20 31 20 22 5c 0a | 4d 6f 76 65 20 70 6f 69 |t] 1 "\.|Move poi|
|000051f0| 6e 74 20 4e 6f 72 74 68 | 20 45 61 73 74 20 6f 6e |nt North| East on|
|00005200| 20 74 68 65 20 47 6f 6d | 6f 6b 75 20 62 6f 61 72 | the Gom|oku boar|
|00005210| 64 2e 22 20 6e 69 6c 5d | 29 0a 28 66 73 65 74 20 |d." nil]|).(fset |
|00005220| 27 67 6f 6d 6f 6b 75 2d | 6d 6f 76 65 2d 73 65 20 |'gomoku-|move-se |
|00005230| 23 5b 6e 69 6c 20 22 c0 | 20 88 c1 20 87 22 20 5b |#[nil ".| .. ." [|
|00005240| 67 6f 6d 6f 6b 75 2d 6d | 6f 76 65 2d 64 6f 77 6e |gomoku-m|ove-down|
|00005250| 20 67 6f 6d 6f 6b 75 2d | 6d 6f 76 65 2d 72 69 67 | gomoku-|move-rig|
|00005260| 68 74 5d 20 31 20 22 5c | 0a 4d 6f 76 65 20 70 6f |ht] 1 "\|.Move po|
|00005270| 69 6e 74 20 53 6f 75 74 | 68 20 45 61 73 74 20 6f |int Sout|h East o|
|00005280| 6e 20 74 68 65 20 47 6f | 6d 6f 6b 75 20 62 6f 61 |n the Go|moku boa|
|00005290| 72 64 2e 22 20 6e 69 6c | 5d 29 0a 28 66 73 65 74 |rd." nil|]).(fset|
|000052a0| 20 27 67 6f 6d 6f 6b 75 | 2d 6d 6f 76 65 2d 6e 77 | 'gomoku|-move-nw|
|000052b0| 20 23 5b 6e 69 6c 20 22 | c0 20 88 c1 20 87 22 20 | #[nil "|. .. ." |
|000052c0| 5b 67 6f 6d 6f 6b 75 2d | 6d 6f 76 65 2d 75 70 20 |[gomoku-|move-up |
|000052d0| 67 6f 6d 6f 6b 75 2d 6d | 6f 76 65 2d 6c 65 66 74 |gomoku-m|ove-left|
|000052e0| 5d 20 31 20 22 5c 0a 4d | 6f 76 65 20 70 6f 69 6e |] 1 "\.M|ove poin|
|000052f0| 74 20 4e 6f 72 74 68 20 | 57 65 73 74 20 6f 6e 20 |t North |West on |
|00005300| 74 68 65 20 47 6f 6d 6f | 6b 75 20 62 6f 61 72 64 |the Gomo|ku board|
|00005310| 2e 22 20 6e 69 6c 5d 29 | 0a 28 66 73 65 74 20 27 |." nil])|.(fset '|
|00005320| 67 6f 6d 6f 6b 75 2d 6d | 6f 76 65 2d 73 77 20 23 |gomoku-m|ove-sw #|
|00005330| 5b 6e 69 6c 20 22 c0 20 | 88 c1 20 87 22 20 5b 67 |[nil ". |.. ." [g|
|00005340| 6f 6d 6f 6b 75 2d 6d 6f | 76 65 2d 64 6f 77 6e 20 |omoku-mo|ve-down |
|00005350| 67 6f 6d 6f 6b 75 2d 6d | 6f 76 65 2d 6c 65 66 74 |gomoku-m|ove-left|
|00005360| 5d 20 31 20 22 5c 0a 4d | 6f 76 65 20 70 6f 69 6e |] 1 "\.M|ove poin|
|00005370| 74 20 53 6f 75 74 68 20 | 57 65 73 74 20 6f 6e 20 |t South |West on |
|00005380| 74 68 65 20 47 6f 6d 6f | 6b 75 20 62 6f 61 72 64 |the Gomo|ku board|
|00005390| 2e 22 20 6e 69 6c 5d 29 | 0a |." nil])|. |
+--------+-------------------------+-------------------------+--------+--------+