home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / msdos / winemacs / lisp / packages / gomoku.elc < prev    next >
Unknown  |  1993-06-08  |  20.9 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Combustion 2 Particle Library (other/combustion2ParticleLibrary) ext Unsupported
1% dexvert Emacs Compiled Lisp (other/emacsCompiledLisp) ext Unsupported
100% file data default
100% TrID Summation Document Image Information Load File default (weak)
100% gt2 Kopftext: ';;; compiled by jwz' default (weak)



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