home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / compsrcs / games / new / 911213.0 < prev    next >
SHell self-extracting ARchive  |  1991-12-13  |  54.5 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: SHell self-extracting ARchive (archive/shar).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert PCP archive log (other/pcpArchiveLog) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/329 Shell Archive Format default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 75 75 | 6e 65 74 21 7a 65 70 68 |Path: uu|net!zeph|
|00000010| 79 72 2e 65 6e 73 2e 74 | 65 6b 2e 63 6f 6d 21 6d |yr.ens.t|ek.com!m|
|00000020| 61 73 74 65 72 21 73 61 | 61 62 21 62 69 6c 6c 72 |aster!sa|ab!billr|
|00000030| 0a 46 72 6f 6d 3a 20 62 | 69 6c 6c 72 40 73 61 61 |.From: b|illr@saa|
|00000040| 62 2e 43 4e 41 2e 54 45 | 4b 2e 43 4f 4d 20 28 42 |b.CNA.TE|K.COM (B|
|00000050| 69 6c 6c 20 52 61 6e 64 | 6c 65 29 0a 4e 65 77 73 |ill Rand|le).News|
|00000060| 67 72 6f 75 70 73 3a 20 | 63 6f 6d 70 2e 73 6f 75 |groups: |comp.sou|
|00000070| 72 63 65 73 2e 67 61 6d | 65 73 0a 53 75 62 6a 65 |rces.gam|es.Subje|
|00000080| 63 74 3a 20 76 31 33 69 | 30 31 30 3a 20 20 78 6d |ct: v13i|010: xm|
|00000090| 61 6b 65 35 20 2d 20 63 | 6f 6e 6e 65 63 74 20 66 |ake5 - c|onnect f|
|000000a0| 69 76 65 2d 69 6e 2d 61 | 2d 72 6f 77 20 67 61 6d |ive-in-a|-row gam|
|000000b0| 65 2c 20 50 61 72 74 30 | 31 2f 30 33 0a 4d 65 73 |e, Part0|1/03.Mes|
|000000c0| 73 61 67 65 2d 49 44 3a | 20 3c 32 31 36 30 40 6d |sage-ID:| <2160@m|
|000000d0| 61 73 74 65 72 43 4e 41 | 2e 54 45 4b 2e 43 4f 4d |asterCNA|.TEK.COM|
|000000e0| 3e 0a 44 61 74 65 3a 20 | 31 33 20 44 65 63 20 39 |>.Date: |13 Dec 9|
|000000f0| 31 20 32 32 3a 32 30 3a | 33 37 20 47 4d 54 0a 53 |1 22:20:|37 GMT.S|
|00000100| 65 6e 64 65 72 3a 20 6e | 65 77 73 40 6d 61 73 74 |ender: n|ews@mast|
|00000110| 65 72 43 4e 41 2e 54 45 | 4b 2e 43 4f 4d 0a 4c 69 |erCNA.TE|K.COM.Li|
|00000120| 6e 65 73 3a 20 31 35 35 | 32 0a 41 70 70 72 6f 76 |nes: 155|2.Approv|
|00000130| 65 64 3a 20 62 69 6c 6c | 72 40 73 61 61 62 2e 43 |ed: bill|r@saab.C|
|00000140| 4e 41 2e 54 45 4b 2e 43 | 4f 4d 0a 0a 53 75 62 6d |NA.TEK.C|OM..Subm|
|00000150| 69 74 74 65 64 2d 62 79 | 3a 20 68 73 69 65 68 63 |itted-by|: hsiehc|
|00000160| 68 40 53 50 55 4e 4b 59 | 2e 43 53 2e 4e 59 55 2e |h@SPUNKY|.CS.NYU.|
|00000170| 45 44 55 20 28 43 68 69 | 68 2d 48 75 6e 67 20 48 |EDU (Chi|h-Hung H|
|00000180| 73 69 65 68 29 0a 50 6f | 73 74 69 6e 67 2d 6e 75 |sieh).Po|sting-nu|
|00000190| 6d 62 65 72 3a 20 56 6f | 6c 75 6d 65 20 31 33 2c |mber: Vo|lume 13,|
|000001a0| 20 49 73 73 75 65 20 31 | 30 0a 41 72 63 68 69 76 | Issue 1|0.Archiv|
|000001b0| 65 2d 6e 61 6d 65 3a 20 | 78 6d 61 6b 65 35 2f 50 |e-name: |xmake5/P|
|000001c0| 61 72 74 30 31 0a 45 6e | 76 69 72 6f 6e 6d 65 6e |art01.En|vironmen|
|000001d0| 74 3a 20 43 2b 2b 2c 20 | 58 31 31 2c 20 63 75 72 |t: C++, |X11, cur|
|000001e0| 73 65 73 0a 0a 5b 54 68 | 69 73 20 72 65 71 75 69 |ses..[Th|is requi|
|000001f0| 72 65 73 20 61 20 43 2b | 2b 20 63 6f 6d 70 69 6c |res a C+|+ compil|
|00000200| 65 72 20 74 6f 20 62 75 | 69 6c 64 20 61 6e 64 20 |er to bu|ild and |
|00000210| 69 6e 63 6c 75 64 65 73 | 20 62 6f 74 68 20 61 6e |includes| both an|
|00000220| 20 58 20 61 6e 64 20 63 | 75 72 73 65 73 0a 20 69 | X and c|urses. i|
|00000230| 6e 74 65 72 66 61 63 65 | 2e 20 20 2d 62 72 5d 0a |nterface|. -br].|
|00000240| 0a 23 21 20 2f 62 69 6e | 2f 73 68 0a 23 20 54 68 |.#! /bin|/sh.# Th|
|00000250| 69 73 20 69 73 20 61 20 | 73 68 65 6c 6c 20 61 72 |is is a |shell ar|
|00000260| 63 68 69 76 65 2e 20 20 | 52 65 6d 6f 76 65 20 61 |chive. |Remove a|
|00000270| 6e 79 74 68 69 6e 67 20 | 62 65 66 6f 72 65 20 74 |nything |before t|
|00000280| 68 69 73 20 6c 69 6e 65 | 2c 20 74 68 65 6e 20 75 |his line|, then u|
|00000290| 6e 70 61 63 6b 0a 23 20 | 69 74 20 62 79 20 73 61 |npack.# |it by sa|
|000002a0| 76 69 6e 67 20 69 74 20 | 69 6e 74 6f 20 61 20 66 |ving it |into a f|
|000002b0| 69 6c 65 20 61 6e 64 20 | 74 79 70 69 6e 67 20 22 |ile and |typing "|
|000002c0| 73 68 20 66 69 6c 65 22 | 2e 20 20 54 6f 20 6f 76 |sh file"|. To ov|
|000002d0| 65 72 77 72 69 74 65 20 | 65 78 69 73 74 69 6e 67 |erwrite |existing|
|000002e0| 0a 23 20 66 69 6c 65 73 | 2c 20 74 79 70 65 20 22 |.# files|, type "|
|000002f0| 73 68 20 66 69 6c 65 20 | 2d 63 22 2e 20 20 59 6f |sh file |-c". Yo|
|00000300| 75 20 63 61 6e 20 61 6c | 73 6f 20 66 65 65 64 20 |u can al|so feed |
|00000310| 74 68 69 73 20 61 73 20 | 73 74 61 6e 64 61 72 64 |this as |standard|
|00000320| 20 69 6e 70 75 74 20 76 | 69 61 0a 23 20 75 6e 73 | input v|ia.# uns|
|00000330| 68 61 72 2c 20 6f 72 20 | 62 79 20 74 79 70 69 6e |har, or |by typin|
|00000340| 67 20 22 73 68 20 3c 66 | 69 6c 65 22 2c 20 65 2e |g "sh <f|ile", e.|
|00000350| 67 2e 2e 20 20 49 66 20 | 74 68 69 73 20 61 72 63 |g.. If |this arc|
|00000360| 68 69 76 65 20 69 73 20 | 63 6f 6d 70 6c 65 74 65 |hive is |complete|
|00000370| 2c 20 79 6f 75 0a 23 20 | 77 69 6c 6c 20 73 65 65 |, you.# |will see|
|00000380| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 6d | the fol|lowing m|
|00000390| 65 73 73 61 67 65 20 61 | 74 20 74 68 65 20 65 6e |essage a|t the en|
|000003a0| 64 3a 0a 23 09 09 22 45 | 6e 64 20 6f 66 20 61 72 |d:.#.."E|nd of ar|
|000003b0| 63 68 69 76 65 20 31 20 | 28 6f 66 20 33 29 2e 22 |chive 1 |(of 3)."|
|000003c0| 0a 23 20 43 6f 6e 74 65 | 6e 74 73 3a 20 20 52 45 |.# Conte|nts: RE|
|000003d0| 41 44 4d 45 20 4d 41 4e | 49 46 45 53 54 20 63 6d |ADME MAN|IFEST cm|
|000003e0| 61 6b 65 35 2e 43 20 69 | 6e 69 74 62 64 2e 43 20 |ake5.C i|nitbd.C |
|000003f0| 78 6d 61 6b 65 35 2e 63 | 0a 23 20 57 72 61 70 70 |xmake5.c|.# Wrapp|
|00000400| 65 64 20 62 79 20 62 69 | 6c 6c 72 40 73 61 61 62 |ed by bi|llr@saab|
|00000410| 20 6f 6e 20 46 72 69 20 | 44 65 63 20 31 33 20 31 | on Fri |Dec 13 1|
|00000420| 34 3a 31 34 3a 35 36 20 | 31 39 39 31 0a 50 41 54 |4:14:56 |1991.PAT|
|00000430| 48 3d 2f 62 69 6e 3a 2f | 75 73 72 2f 62 69 6e 3a |H=/bin:/|usr/bin:|
|00000440| 2f 75 73 72 2f 75 63 62 | 20 3b 20 65 78 70 6f 72 |/usr/ucb| ; expor|
|00000450| 74 20 50 41 54 48 0a 69 | 66 20 74 65 73 74 20 2d |t PATH.i|f test -|
|00000460| 66 20 27 52 45 41 44 4d | 45 27 20 2d 61 20 22 24 |f 'READM|E' -a "$|
|00000470| 7b 31 7d 22 20 21 3d 20 | 22 2d 63 22 20 3b 20 74 |{1}" != |"-c" ; t|
|00000480| 68 65 6e 20 0a 20 20 65 | 63 68 6f 20 73 68 61 72 |hen . e|cho shar|
|00000490| 3a 20 57 69 6c 6c 20 6e | 6f 74 20 63 6c 6f 62 62 |: Will n|ot clobb|
|000004a0| 65 72 20 65 78 69 73 74 | 69 6e 67 20 66 69 6c 65 |er exist|ing file|
|000004b0| 20 5c 22 27 52 45 41 44 | 4d 45 27 5c 22 0a 65 6c | \"'READ|ME'\".el|
|000004c0| 73 65 0a 65 63 68 6f 20 | 73 68 61 72 3a 20 45 78 |se.echo |shar: Ex|
|000004d0| 74 72 61 63 74 69 6e 67 | 20 5c 22 27 52 45 41 44 |tracting| \"'READ|
|000004e0| 4d 45 27 5c 22 20 5c 28 | 32 37 38 36 20 63 68 61 |ME'\" \(|2786 cha|
|000004f0| 72 61 63 74 65 72 73 5c | 29 0a 73 65 64 20 22 73 |racters\|).sed "s|
|00000500| 2f 5e 58 2f 2f 22 20 3e | 27 52 45 41 44 4d 45 27 |/^X//" >|'README'|
|00000510| 20 3c 3c 27 45 4e 44 5f | 4f 46 5f 46 49 4c 45 27 | <<'END_|OF_FILE'|
|00000520| 0a 58 58 31 31 20 42 61 | 73 65 64 20 4d 61 6b 65 |.XX11 Ba|sed Make|
|00000530| 35 20 2f 20 56 65 72 73 | 69 6f 6e 20 31 2e 31 0a |5 / Vers|ion 1.1.|
|00000540| 58 0a 58 4d 61 6b 65 35 | 20 69 73 20 61 6e 20 69 |X.XMake5| is an i|
|00000550| 6e 74 65 72 65 73 74 69 | 6e 67 20 61 6e 64 20 63 |nteresti|ng and c|
|00000560| 68 61 6c 6c 65 6e 67 69 | 6e 67 20 67 61 6d 65 2e |hallengi|ng game.|
|00000570| 20 20 49 74 20 69 73 20 | 61 6c 73 6f 0a 58 63 61 | It is |also.Xca|
|00000580| 6c 6c 65 64 20 35 2d 69 | 6e 2d 61 2d 72 6f 77 20 |lled 5-i|n-a-row |
|00000590| 6f 72 20 47 6f 2d 4d 6f | 6b 75 20 69 6e 20 6f 74 |or Go-Mo|ku in ot|
|000005a0| 68 65 72 20 70 72 6f 67 | 72 61 6d 73 2e 20 20 52 |her prog|rams. R|
|000005b0| 75 6c 65 73 20 6f 66 20 | 0a 58 74 68 69 73 20 67 |ules of |.Xthis g|
|000005c0| 61 6d 65 20 61 6e 64 20 | 6f 74 68 65 72 20 64 65 |ame and |other de|
|000005d0| 74 61 69 6c 73 20 61 72 | 65 20 61 76 61 69 6c 61 |tails ar|e availa|
|000005e0| 62 6c 65 20 69 6e 20 74 | 68 65 20 6f 6e 2d 6c 69 |ble in t|he on-li|
|000005f0| 6e 65 20 0a 58 48 45 4c | 50 2c 20 74 68 65 20 66 |ne .XHEL|P, the f|
|00000600| 69 6c 65 20 78 6d 61 6b | 65 35 2e 64 6f 63 2c 20 |ile xmak|e5.doc, |
|00000610| 61 6e 64 20 74 68 65 20 | 6d 61 6e 20 70 61 67 65 |and the |man page|
|00000620| 20 78 6d 61 6b 65 35 2e | 36 2e 0a 58 0a 58 48 6f | xmake5.|6..X.XHo|
|00000630| 77 20 74 6f 20 49 6e 73 | 74 61 6c 6c 3a 0a 58 2d |w to Ins|tall:.X-|
|00000640| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 0a 58 |--------|------.X|
|00000650| 0a 58 54 68 69 73 20 70 | 72 6f 67 72 61 6d 20 68 |.XThis p|rogram h|
|00000660| 61 73 20 62 65 65 6e 20 | 74 65 73 74 65 64 20 6f |as been |tested o|
|00000670| 6e 20 53 55 4e 34 20 61 | 6e 64 20 53 55 4e 33 20 |n SUN4 a|nd SUN3 |
|00000680| 77 69 74 68 20 58 31 31 | 2f 52 34 2e 0a 58 41 20 |with X11|/R4..XA |
|00000690| 73 69 6d 70 6c 65 20 4d | 61 6b 65 66 69 6c 65 20 |simple M|akefile |
|000006a0| 69 73 20 70 72 6f 76 69 | 64 65 64 20 74 6f 20 63 |is provi|ded to c|
|000006b0| 72 65 61 74 65 20 74 68 | 65 20 65 78 65 63 75 74 |reate th|e execut|
|000006c0| 61 62 6c 65 20 0a 58 66 | 69 6c 65 73 20 78 6d 61 |able .Xf|iles xma|
|000006d0| 6b 65 35 20 61 6e 64 20 | 63 6d 61 6b 65 35 2e 20 |ke5 and |cmake5. |
|000006e0| 20 0a 58 0a 58 22 78 6d | 61 6b 65 35 22 20 75 73 | .X.X"xm|ake5" us|
|000006f0| 65 73 20 74 68 65 20 41 | 74 68 65 6e 61 20 77 69 |es the A|thena wi|
|00000700| 64 67 65 74 73 20 61 6e | 64 20 22 63 6d 61 6b 65 |dgets an|d "cmake|
|00000710| 35 22 20 75 73 65 73 20 | 74 68 65 0a 58 55 4e 49 |5" uses |the.XUNI|
|00000720| 58 20 63 75 72 73 65 73 | 20 6c 69 62 72 61 72 79 |X curses| library|
|00000730| 2e 20 20 54 68 65 79 20 | 62 6f 74 68 20 72 65 71 |. They |both req|
|00000740| 75 69 72 65 20 61 20 43 | 2b 2b 20 63 6f 6d 70 69 |uire a C|++ compi|
|00000750| 6c 65 72 2e 0a 58 59 6f | 75 20 6d 61 79 20 75 73 |ler..XYo|u may us|
|00000760| 65 20 47 4e 55 20 43 20 | 61 6e 64 20 43 2b 2b 20 |e GNU C |and C++ |
|00000770| 63 6f 6d 70 69 6c 65 72 | 73 20 69 66 20 69 74 20 |compiler|s if it |
|00000780| 69 73 20 66 65 61 73 69 | 62 6c 65 2e 0a 58 0a 58 |is feasi|ble..X.X|
|00000790| 54 6f 20 6d 61 6b 65 20 | 74 68 65 20 65 78 65 63 |To make |the exec|
|000007a0| 75 74 61 62 6c 65 20 66 | 69 6c 65 73 3a 0a 58 0a |utable f|iles:.X.|
|000007b0| 58 28 31 29 20 43 68 61 | 6e 67 65 20 74 68 65 20 |X(1) Cha|nge the |
|000007c0| 64 69 72 65 63 74 6f 72 | 79 20 61 6e 64 20 66 69 |director|y and fi|
|000007d0| 6c 65 20 6e 61 6d 65 73 | 20 69 6e 20 74 68 65 20 |le names| in the |
|000007e0| 4d 61 6b 65 66 69 6c 65 | 3a 0a 58 20 20 20 20 20 |Makefile|:.X |
|000007f0| 20 20 20 42 49 4e 44 49 | 52 3a 20 20 20 20 20 20 | BINDI|R: |
|00000800| 20 20 20 77 68 65 72 65 | 20 74 6f 20 70 75 74 20 | where| to put |
|00000810| 74 68 65 20 65 78 65 63 | 75 74 61 62 6c 65 20 66 |the exec|utable f|
|00000820| 69 6c 65 73 0a 58 20 20 | 20 20 20 20 20 20 53 43 |iles.X | SC|
|00000830| 4f 52 45 44 49 52 3a 20 | 20 20 20 20 20 20 77 68 |OREDIR: | wh|
|00000840| 65 72 65 20 74 6f 20 70 | 75 74 20 74 68 65 20 68 |ere to p|ut the h|
|00000850| 69 67 68 20 73 63 6f 72 | 65 20 66 69 6c 65 73 0a |igh scor|e files.|
|00000860| 58 20 20 20 20 20 20 20 | 20 4d 41 4e 44 49 52 3a |X | MANDIR:|
|00000870| 20 20 20 20 20 20 20 20 | 20 77 68 65 72 65 20 74 | | where t|
|00000880| 6f 20 70 75 74 20 74 68 | 65 20 6d 61 6e 20 70 61 |o put th|e man pa|
|00000890| 67 65 73 0a 58 20 20 20 | 20 20 20 20 20 53 43 4f |ges.X | SCO|
|000008a0| 52 45 5f 46 3a 20 20 20 | 20 20 20 20 20 74 68 65 |RE_F: | the|
|000008b0| 20 68 69 67 68 20 73 63 | 6f 72 65 20 66 69 6c 65 | high sc|ore file|
|000008c0| 0a 58 20 20 20 20 20 20 | 20 20 4c 4f 43 4b 5f 46 |.X | LOCK_F|
|000008d0| 3a 20 20 20 20 20 20 20 | 20 20 74 68 65 20 6c 6f |: | the lo|
|000008e0| 63 6b 65 72 20 66 6f 72 | 20 74 68 65 20 68 69 67 |cker for| the hig|
|000008f0| 68 20 73 63 6f 72 65 20 | 66 69 6c 65 0a 58 20 20 |h score |file.X |
|00000900| 20 20 20 20 20 20 4d 41 | 49 4c 45 52 3a 20 20 20 | MA|ILER: |
|00000910| 20 20 20 20 20 20 75 73 | 65 64 20 62 79 20 63 6d | us|ed by cm|
|00000920| 61 6b 65 35 20 6f 6e 6c | 79 0a 58 0a 58 28 32 29 |ake5 onl|y.X.X(2)|
|00000930| 20 54 79 70 65 20 22 6d | 61 6b 65 22 20 74 6f 20 | Type "m|ake" to |
|00000940| 6d 61 6b 65 20 22 78 6d | 61 6b 65 35 22 2c 20 22 |make "xm|ake5", "|
|00000950| 63 6d 61 6b 65 35 22 2c | 20 61 6e 64 20 74 68 65 |cmake5",| and the|
|00000960| 20 69 6e 69 74 69 61 6c | 0a 58 20 20 20 20 68 69 | initial|.X hi|
|00000970| 67 68 20 73 63 6f 72 65 | 20 66 69 6c 65 2e 0a 58 |gh score| file..X|
|00000980| 0a 58 28 33 29 20 54 79 | 70 65 20 22 6d 61 6b 65 |.X(3) Ty|pe "make|
|00000990| 20 69 6e 73 74 61 6c 6c | 22 20 74 6f 20 69 6e 73 | install|" to ins|
|000009a0| 74 61 6c 6c 20 22 78 6d | 61 6b 65 35 22 20 61 6e |tall "xm|ake5" an|
|000009b0| 64 20 22 63 6d 61 6b 65 | 35 22 0a 58 20 20 20 20 |d "cmake|5".X |
|000009c0| 69 6e 20 74 68 65 20 42 | 49 4e 44 49 52 2c 20 61 |in the B|INDIR, a|
|000009d0| 6e 64 20 74 6f 20 63 6f | 70 79 20 22 78 6d 61 6b |nd to co|py "xmak|
|000009e0| 65 35 2e 36 22 20 61 6e | 64 20 22 63 6d 61 6b 65 |e5.6" an|d "cmake|
|000009f0| 35 2e 36 22 0a 58 20 20 | 20 20 74 6f 20 74 68 65 |5.6".X | to the|
|00000a00| 20 4d 41 4e 44 49 52 2e | 0a 58 0a 58 49 6e 20 58 | MANDIR.|.X.XIn X|
|00000a10| 4d 61 6b 65 35 2e 61 64 | 20 79 6f 75 20 63 61 6e |Make5.ad| you can|
|00000a20| 20 66 69 6e 64 20 74 68 | 65 20 58 20 72 65 73 6f | find th|e X reso|
|00000a30| 75 72 63 65 73 20 75 73 | 65 64 20 62 79 20 78 6d |urces us|ed by xm|
|00000a40| 61 6b 65 35 2e 0a 58 54 | 68 65 20 64 65 66 61 75 |ake5..XT|he defau|
|00000a50| 6c 74 73 20 6c 69 73 74 | 65 64 20 69 6e 20 58 4d |lts list|ed in XM|
|00000a60| 61 6b 65 35 2e 61 64 20 | 63 6f 75 6c 64 20 62 65 |ake5.ad |could be|
|00000a70| 20 6d 6f 64 69 66 69 65 | 64 20 66 6f 72 20 79 6f | modifie|d for yo|
|00000a80| 75 72 0a 58 63 75 73 74 | 6f 6d 69 7a 65 64 20 58 |ur.Xcust|omized X|
|00000a90| 20 65 6e 76 69 72 6f 6e | 6d 65 6e 74 2e 20 20 4c | environ|ment. L|
|00000aa0| 69 6b 65 20 61 6c 6c 20 | 58 20 61 70 70 6c 69 63 |ike all |X applic|
|00000ab0| 61 74 69 6f 6e 20 64 65 | 66 61 75 6c 74 20 66 69 |ation de|fault fi|
|00000ac0| 6c 65 73 2c 0a 58 79 6f | 75 20 6d 61 79 20 70 75 |les,.Xyo|u may pu|
|00000ad0| 74 20 79 6f 75 72 20 6f | 77 6e 20 58 4d 61 6b 65 |t your o|wn XMake|
|00000ae0| 35 20 69 6e 20 79 6f 75 | 72 20 58 20 61 70 70 6c |5 in you|r X appl|
|00000af0| 69 63 61 74 69 6f 6e 20 | 64 65 66 61 75 6c 74 20 |ication |default |
|00000b00| 0a 58 64 69 72 65 63 74 | 6f 72 79 20 6f 72 20 6d |.Xdirect|ory or m|
|00000b10| 65 72 67 65 20 69 74 20 | 69 6e 74 6f 20 79 6f 75 |erge it |into you|
|00000b20| 72 20 58 20 72 65 73 6f | 75 72 63 65 20 64 61 74 |r X reso|urce dat|
|00000b30| 61 62 61 73 65 20 75 73 | 69 6e 67 20 74 68 65 0a |abase us|ing the.|
|00000b40| 58 66 6f 6c 6c 6f 77 69 | 6e 67 20 63 6f 6d 6d 61 |Xfollowi|ng comma|
|00000b50| 6e 64 3a 20 20 22 78 72 | 64 62 20 2d 6d 65 72 67 |nd: "xr|db -merg|
|00000b60| 65 20 58 4d 61 6b 65 35 | 22 2e 0a 58 0a 58 20 20 |e XMake5|"..X.X |
|00000b70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000b80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000b90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 4e 6f 76 | | Nov|
|00000ba0| 65 6d 62 65 72 20 32 38 | 2c 20 31 39 39 31 0a 58 |ember 28|, 1991.X|
|00000bb0| 0a 58 41 75 74 68 6f 72 | 3a 20 20 43 68 69 68 2d |.XAuthor|: Chih-|
|00000bc0| 48 75 6e 67 20 48 73 69 | 65 68 20 20 28 70 72 6f |Hung Hsi|eh (pro|
|00000bd0| 6e 6f 75 6e 63 65 20 61 | 73 20 43 68 69 20 48 6f |nounce a|s Chi Ho|
|00000be0| 6e 67 20 53 68 61 79 29 | 0a 58 0a 58 45 2d 6d 61 |ng Shay)|.X.XE-ma|
|00000bf0| 69 6c 3a 20 20 68 73 69 | 65 68 63 68 40 63 73 2e |il: hsi|ehch@cs.|
|00000c00| 6e 79 75 2e 65 64 75 0a | 58 0a 58 0a 58 20 20 20 |nyu.edu.|X.X.X |
|00000c10| 20 20 20 20 20 48 73 69 | 65 68 20 20 20 20 20 20 | Hsi|eh |
|00000c20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 43 68 69 | | Chi|
|00000c30| 68 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |h | |
|00000c40| 20 20 20 20 20 48 75 6e | 67 20 20 20 20 0a 58 2d | Hun|g .X-|
|00000c50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000c60| 2d 2d 2d 2d 2d 2d 2d 20 | 2d 2d 2d 2d 2d 2d 2d 2d |------- |--------|
|00000c70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000c80| 20 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | -------|--------|
|00000c90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 0a 58 20 2c 2c 2c 20 |--------|-.X ,,, |
|00000ca0| 20 20 20 20 20 20 7c 7c | 27 20 20 20 20 20 20 7c | |||' ||
|00000cb0| 7c 27 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7c ||' | ||
|00000cc0| 7c 27 20 20 20 20 20 20 | 20 20 20 20 20 2c 2c 2c ||' | ,,,|
|00000cd0| 2c 2c 2c 2c 2c 2c 7c 2c | 20 20 20 20 20 7c 7c 2c |,,,,,,|,| ||,|
|00000ce0| 0a 58 20 20 27 7c 7c 20 | 20 20 20 2c 2c 7c 2c 2c |.X '|| | ,,|,,|
|00000cf0| 2c 7c 20 20 20 20 7c 7c | 20 20 20 20 20 20 20 20 |,| ||| |
|00000d00| 20 20 20 20 20 20 7c 7c | 20 20 20 20 20 20 20 20 | ||| |
|00000d10| 2c 2c 20 20 20 20 20 20 | 20 20 20 20 7c 7c 27 20 |,, | ||' |
|00000d20| 20 20 20 20 7c 7c 0a 58 | 2c 2c 2c 2c 7c 2c 7c 2c | ||.X|,,,,|,|,|
|00000d30| 20 7c 7c 20 20 20 7c 7c | 20 20 20 20 7c 7c 20 20 | || ||| || |
|00000d40| 20 27 27 27 27 27 27 27 | 27 27 27 27 7c 7c 27 27 | '''''''|''''||''|
|00000d50| 27 27 27 27 27 27 27 27 | 27 20 20 20 20 20 20 20 |''''''''|' |
|00000d60| 20 20 7c 7c 20 20 20 20 | 20 20 7c 7c 0a 58 20 20 | || | ||.X |
|00000d70| 20 20 20 20 20 20 20 7c | 7c 27 27 27 7c 7c 20 2c | |||'''|| ,|
|00000d80| 2c 2c 7c 7c 2c 7c 20 20 | 20 20 20 20 20 20 20 20 |,,||,| | |
|00000d90| 20 20 7c 7c 20 20 20 20 | 20 20 20 20 20 20 20 20 | || | |
|00000da0| 20 7c 2c 2c 2c 2c 2c 2c | 7c 7c 20 20 20 20 20 2c | |,,,,,,||| ,|
|00000db0| 7c 27 0a 58 20 2c 2c 2c | 2c 7c 2c 20 20 7c 7c 2c ||'.X ,,,|,|, ||,|
|00000dc0| 2c 2c 7c 7c 20 20 20 20 | 7c 7c 20 20 20 20 20 20 |,,|| ||| |
|00000dd0| 20 20 20 20 20 20 20 20 | 7c 7c 20 20 20 20 20 20 | ||| |
|00000de0| 2c 2c 20 20 20 20 20 7c | 7c 20 20 20 20 20 27 27 |,, ||| ''|
|00000df0| 20 20 20 20 20 7c 7c 0a | 58 20 20 20 20 20 20 20 | ||.|X |
|00000e00| 20 20 7c 7c 20 20 20 7c | 7c 2c 2c 20 20 7c 7c 20 | || |||,, || |
|00000e10| 20 20 20 20 27 27 27 27 | 27 27 27 27 27 27 27 27 | ''''|''''''''|
|00000e20| 27 27 27 27 27 27 27 27 | 20 20 20 20 7c 7c 20 20 |''''''''| || |
|00000e30| 20 20 20 20 20 20 20 20 | 20 20 7c 7c 0a 58 20 27 | | ||.X '|
|00000e40| 27 27 27 27 27 20 20 7c | 7c 20 2c 2c 7c 7c 27 20 |''''' ||| ,,||' |
|00000e50| 20 20 7c 7c 20 20 20 20 | 20 20 20 20 20 20 20 20 | || | |
|00000e60| 20 2c 2c 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | ,, | |
|00000e70| 20 7c 7c 2c 2c 2c 2c 2c | 2c 7c 2c 20 20 20 7c 7c | ||,,,,,|,|, |||
|00000e80| 0a 58 20 2c 20 20 20 20 | 20 27 7c 7c 27 27 20 2c |.X , | '||'' ,|
|00000e90| 7c 7c 20 7c 20 20 7c 7c | 20 20 20 20 20 20 2c 20 ||| | ||| , |
|00000ea0| 20 7c 7c 27 20 20 27 7c | 2c 20 20 20 20 2c 2c 20 | ||' '||, ,, |
|00000eb0| 20 20 20 20 20 27 27 20 | 20 20 20 20 7c 7c 27 20 | '' | ||' |
|00000ec0| 20 20 7c 27 20 20 20 27 | 2c 0a 58 20 7c 7c 27 27 | |' '|,.X ||''|
|00000ed0| 7c 7c 20 20 20 20 2c 7c | 27 7c 7c 20 20 7c 20 7c ||| ,||'|| | ||
|00000ee0| 7c 20 20 20 20 20 20 7c | 20 20 7c 7c 20 20 20 20 || || || |
|00000ef0| 27 27 20 20 20 20 20 27 | 7c 2c 20 20 20 20 20 20 |'' '||, |
|00000f00| 20 20 20 20 20 7c 7c 20 | 20 20 7c 27 20 20 20 20 | || | |' |
|00000f10| 20 27 7c 0a 58 20 7c 7c | 20 20 7c 7c 20 2c 2c 27 | '|.X ||| || ,,'|
|00000f20| 27 20 20 7c 7c 20 20 20 | 20 7c 7c 20 20 20 20 2c |' || | || ,|
|00000f30| 7c 27 20 20 7c 7c 20 20 | 20 20 20 20 20 20 20 7c ||' || | ||
|00000f40| 20 20 27 7c 7c 20 20 20 | 20 20 20 20 20 20 2c 7c | '|| | ,||
|00000f50| 27 20 20 2c 27 20 20 20 | 20 20 20 2c 7c 7c 0a 58 |' ,' | ,||.X|
|00000f60| 20 7c 7c 20 20 7c 7c 20 | 20 20 20 20 20 20 7c 7c | || || | |||
|00000f70| 20 20 20 20 7c 7c 20 20 | 20 2c 7c 7c 20 20 20 7c | || | ,|| ||
|00000f80| 7c 20 20 20 20 20 20 20 | 20 20 7c 2c 20 20 7c 7c || | |, |||
|00000f90| 27 20 20 20 20 20 20 20 | 2c 7c 27 20 2c 2c 7c 2c |' |,|' ,,|,|
|00000fa0| 2c 2c 7c 27 27 27 20 27 | 7c 7c 0a 58 20 7c 7c 27 |,,|''' '|||.X ||'|
|00000fb0| 27 27 27 20 20 20 20 27 | 27 7c 7c 27 20 27 27 7c |''' '|'||' ''||
|00000fc0| 7c 27 20 20 20 27 27 20 | 20 20 20 27 7c 7c 7c 7c ||' '' | '|||||
|00000fd0| 7c 7c 7c 7c 7c 7c 7c 27 | 20 20 20 20 20 20 20 27 ||||||||'| '|
|00000fe0| 27 27 7c 7c 7c 27 20 20 | 20 27 27 27 27 20 20 20 |''|||' | '''' |
|00000ff0| 20 20 20 20 7c 7c 0a 58 | 2d 2d 2d 2d 2d 2d 2d 2d | ||.X|--------|
|00001000| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001010| 20 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | -------|--------|
|00001020| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 20 2d 2d 2d 2d 2d 2d |--------|- ------|
|00001030| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001040| 2d 2d 0a 45 4e 44 5f 4f | 46 5f 46 49 4c 45 0a 69 |--.END_O|F_FILE.i|
|00001050| 66 20 74 65 73 74 20 32 | 37 38 36 20 2d 6e 65 20 |f test 2|786 -ne |
|00001060| 60 77 63 20 2d 63 20 3c | 27 52 45 41 44 4d 45 27 |`wc -c <|'README'|
|00001070| 60 3b 20 74 68 65 6e 0a | 20 20 20 20 65 63 68 6f |`; then.| echo|
|00001080| 20 73 68 61 72 3a 20 5c | 22 27 52 45 41 44 4d 45 | shar: \|"'README|
|00001090| 27 5c 22 20 75 6e 70 61 | 63 6b 65 64 20 77 69 74 |'\" unpa|cked wit|
|000010a0| 68 20 77 72 6f 6e 67 20 | 73 69 7a 65 21 0a 66 69 |h wrong |size!.fi|
|000010b0| 0a 23 20 65 6e 64 20 6f | 66 20 27 52 45 41 44 4d |.# end o|f 'READM|
|000010c0| 45 27 0a 66 69 0a 69 66 | 20 74 65 73 74 20 2d 66 |E'.fi.if| test -f|
|000010d0| 20 27 4d 41 4e 49 46 45 | 53 54 27 20 2d 61 20 22 | 'MANIFE|ST' -a "|
|000010e0| 24 7b 31 7d 22 20 21 3d | 20 22 2d 63 22 20 3b 20 |${1}" !=| "-c" ; |
|000010f0| 74 68 65 6e 20 0a 20 20 | 65 63 68 6f 20 73 68 61 |then . |echo sha|
|00001100| 72 3a 20 57 69 6c 6c 20 | 6e 6f 74 20 63 6c 6f 62 |r: Will |not clob|
|00001110| 62 65 72 20 65 78 69 73 | 74 69 6e 67 20 66 69 6c |ber exis|ting fil|
|00001120| 65 20 5c 22 27 4d 41 4e | 49 46 45 53 54 27 5c 22 |e \"'MAN|IFEST'\"|
|00001130| 0a 65 6c 73 65 0a 65 63 | 68 6f 20 73 68 61 72 3a |.else.ec|ho shar:|
|00001140| 20 45 78 74 72 61 63 74 | 69 6e 67 20 5c 22 27 4d | Extract|ing \"'M|
|00001150| 41 4e 49 46 45 53 54 27 | 5c 22 20 5c 28 37 39 36 |ANIFEST'|\" \(796|
|00001160| 20 63 68 61 72 61 63 74 | 65 72 73 5c 29 0a 73 65 | charact|ers\).se|
|00001170| 64 20 22 73 2f 5e 58 2f | 2f 22 20 3e 27 4d 41 4e |d "s/^X/|/" >'MAN|
|00001180| 49 46 45 53 54 27 20 3c | 3c 27 45 4e 44 5f 4f 46 |IFEST' <|<'END_OF|
|00001190| 5f 46 49 4c 45 27 0a 58 | 20 20 20 46 69 6c 65 20 |_FILE'.X| File |
|000011a0| 4e 61 6d 65 09 09 41 72 | 63 68 69 76 65 20 23 09 |Name..Ar|chive #.|
|000011b0| 44 65 73 63 72 69 70 74 | 69 6f 6e 0a 58 2d 2d 2d |Descript|ion.X---|
|000011c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000011d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000011e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000011f0| 2d 2d 2d 2d 2d 2d 2d 2d | 0a 58 20 43 4f 50 59 52 |--------|.X COPYR|
|00001200| 49 47 48 54 20 20 20 20 | 20 20 20 20 20 20 20 20 |IGHT | |
|00001210| 20 20 20 20 20 20 33 09 | 0a 58 20 4d 41 4e 49 46 | 3.|.X MANIF|
|00001220| 45 53 54 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |EST | |
|00001230| 20 20 20 20 20 20 31 09 | 54 68 69 73 20 73 68 69 | 1.|This shi|
|00001240| 70 70 69 6e 67 20 6c 69 | 73 74 0a 58 20 4d 61 6b |pping li|st.X Mak|
|00001250| 65 66 69 6c 65 20 20 20 | 20 20 20 20 20 20 20 20 |efile | |
|00001260| 20 20 20 20 20 20 20 20 | 32 09 0a 58 20 52 45 41 | |2..X REA|
|00001270| 44 4d 45 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |DME | |
|00001280| 20 20 20 20 20 20 20 20 | 31 09 0a 58 20 62 64 63 | |1..X bdc|
|00001290| 6f 6e 73 74 2e 68 20 20 | 20 20 20 20 20 20 20 20 |onst.h | |
|000012a0| 20 20 20 20 20 20 20 20 | 32 09 0a 58 20 62 6f 61 | |2..X boa|
|000012b0| 72 64 2e 78 62 6d 20 20 | 20 20 20 20 20 20 20 20 |rd.xbm | |
|000012c0| 20 20 20 20 20 20 20 20 | 33 09 0a 58 20 63 6d 61 | |3..X cma|
|000012d0| 6b 65 35 2e 36 20 20 20 | 20 20 20 20 20 20 20 20 |ke5.6 | |
|000012e0| 20 20 20 20 20 20 20 20 | 33 09 0a 58 20 63 6d 61 | |3..X cma|
|000012f0| 6b 65 35 2e 43 20 20 20 | 20 20 20 20 20 20 20 20 |ke5.C | |
|00001300| 20 20 20 20 20 20 20 20 | 31 09 0a 58 20 64 65 62 | |1..X deb|
|00001310| 75 67 2e 69 6e 63 20 20 | 20 20 20 20 20 20 20 20 |ug.inc | |
|00001320| 20 20 20 20 20 20 20 20 | 32 09 0a 58 20 64 72 61 | |2..X dra|
|00001330| 77 69 6e 67 2e 63 20 20 | 20 20 20 20 20 20 20 20 |wing.c | |
|00001340| 20 20 20 20 20 20 20 20 | 32 09 0a 58 20 68 65 6c | |2..X hel|
|00001350| 70 74 65 78 74 2e 43 20 | 20 20 20 20 20 20 20 20 |ptext.C | |
|00001360| 20 20 20 20 20 20 20 20 | 32 09 0a 58 20 69 6e 69 | |2..X ini|
|00001370| 74 62 64 2e 43 20 20 20 | 20 20 20 20 20 20 20 20 |tbd.C | |
|00001380| 20 20 20 20 20 20 20 20 | 31 09 0a 58 20 6c 69 6e | |1..X lin|
|00001390| 65 5f 76 61 6c 2e 69 6e | 63 20 20 20 20 20 20 20 |e_val.in|c |
|000013a0| 20 20 20 20 20 20 20 20 | 33 09 0a 58 20 6d 61 6b | |3..X mak|
|000013b0| 65 35 2e 43 20 20 20 20 | 20 20 20 20 20 20 20 20 |e5.C | |
|000013c0| 20 20 20 20 20 20 20 20 | 32 09 0a 58 20 6d 61 6b | |2..X mak|
|000013d0| 65 35 2e 78 62 6d 20 20 | 20 20 20 20 20 20 20 20 |e5.xbm | |
|000013e0| 20 20 20 20 20 20 20 20 | 32 09 0a 58 20 70 72 69 | |2..X pri|
|000013f0| 6e 74 68 65 6c 70 2e 63 | 20 20 20 20 20 20 20 20 |nthelp.c| |
|00001400| 20 20 20 20 20 20 20 20 | 33 09 0a 58 20 72 65 63 | |3..X rec|
|00001410| 6f 72 64 2e 63 20 20 20 | 20 20 20 20 20 20 20 20 |ord.c | |
|00001420| 20 20 20 20 20 20 20 20 | 32 09 0a 58 20 73 65 6c | |2..X sel|
|00001430| 65 63 74 2e 43 20 20 20 | 20 20 20 20 20 20 20 20 |ect.C | |
|00001440| 20 20 20 20 20 20 20 20 | 32 09 0a 58 20 78 6d 61 | |2..X xma|
|00001450| 6b 65 35 2e 36 20 20 20 | 20 20 20 20 20 20 20 20 |ke5.6 | |
|00001460| 20 20 20 20 20 20 20 20 | 32 09 0a 58 20 78 6d 61 | |2..X xma|
|00001470| 6b 65 35 2e 63 20 20 20 | 20 20 20 20 20 20 20 20 |ke5.c | |
|00001480| 20 20 20 20 20 20 20 20 | 31 09 0a 58 20 78 6d 61 | |1..X xma|
|00001490| 6b 65 35 2e 64 6f 63 20 | 20 20 20 20 20 20 20 20 |ke5.doc | |
|000014a0| 20 20 20 20 20 20 20 20 | 32 09 0a 58 20 78 6d 61 | |2..X xma|
|000014b0| 6b 65 35 2e 68 20 20 20 | 20 20 20 20 20 20 20 20 |ke5.h | |
|000014c0| 20 20 20 20 20 20 20 20 | 33 09 0a 45 4e 44 5f 4f | |3..END_O|
|000014d0| 46 5f 46 49 4c 45 0a 69 | 66 20 74 65 73 74 20 37 |F_FILE.i|f test 7|
|000014e0| 39 36 20 2d 6e 65 20 60 | 77 63 20 2d 63 20 3c 27 |96 -ne `|wc -c <'|
|000014f0| 4d 41 4e 49 46 45 53 54 | 27 60 3b 20 74 68 65 6e |MANIFEST|'`; then|
|00001500| 0a 20 20 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |. ech|o shar: |
|00001510| 5c 22 27 4d 41 4e 49 46 | 45 53 54 27 5c 22 20 75 |\"'MANIF|EST'\" u|
|00001520| 6e 70 61 63 6b 65 64 20 | 77 69 74 68 20 77 72 6f |npacked |with wro|
|00001530| 6e 67 20 73 69 7a 65 21 | 0a 66 69 0a 23 20 65 6e |ng size!|.fi.# en|
|00001540| 64 20 6f 66 20 27 4d 41 | 4e 49 46 45 53 54 27 0a |d of 'MA|NIFEST'.|
|00001550| 66 69 0a 69 66 20 74 65 | 73 74 20 2d 66 20 27 63 |fi.if te|st -f 'c|
|00001560| 6d 61 6b 65 35 2e 43 27 | 20 2d 61 20 22 24 7b 31 |make5.C'| -a "${1|
|00001570| 7d 22 20 21 3d 20 22 2d | 63 22 20 3b 20 74 68 65 |}" != "-|c" ; the|
|00001580| 6e 20 0a 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |n . ech|o shar: |
|00001590| 57 69 6c 6c 20 6e 6f 74 | 20 63 6c 6f 62 62 65 72 |Will not| clobber|
|000015a0| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 20 5c | existin|g file \|
|000015b0| 22 27 63 6d 61 6b 65 35 | 2e 43 27 5c 22 0a 65 6c |"'cmake5|.C'\".el|
|000015c0| 73 65 0a 65 63 68 6f 20 | 73 68 61 72 3a 20 45 78 |se.echo |shar: Ex|
|000015d0| 74 72 61 63 74 69 6e 67 | 20 5c 22 27 63 6d 61 6b |tracting| \"'cmak|
|000015e0| 65 35 2e 43 27 5c 22 20 | 5c 28 31 36 38 34 39 20 |e5.C'\" |\(16849 |
|000015f0| 63 68 61 72 61 63 74 65 | 72 73 5c 29 0a 73 65 64 |characte|rs\).sed|
|00001600| 20 22 73 2f 5e 58 2f 2f | 22 20 3e 27 63 6d 61 6b | "s/^X//|" >'cmak|
|00001610| 65 35 2e 43 27 20 3c 3c | 27 45 4e 44 5f 4f 46 5f |e5.C' <<|'END_OF_|
|00001620| 46 49 4c 45 27 0a 58 2f | 2f 20 46 69 6c 65 3a 20 |FILE'.X/|/ File: |
|00001630| 63 6d 61 6b 65 35 2e 43 | 20 20 20 20 20 20 20 28 |cmake5.C| (|
|00001640| 74 68 65 20 4d 61 6b 65 | 35 20 67 61 6d 65 20 70 |the Make|5 game p|
|00001650| 72 6f 67 72 61 6d 2c 20 | 63 75 72 73 65 73 20 76 |rogram, |curses v|
|00001660| 65 72 73 69 6f 6e 29 0a | 58 0a 58 65 78 74 65 72 |ersion).|X.Xexter|
|00001670| 6e 20 22 43 22 20 7b 0a | 58 23 69 6e 63 6c 75 64 |n "C" {.|X#includ|
|00001680| 65 20 3c 73 74 64 69 6f | 2e 68 3e 0a 58 23 69 6e |e <stdio|.h>.X#in|
|00001690| 63 6c 75 64 65 20 3c 63 | 75 72 73 65 73 2e 68 3e |clude <c|urses.h>|
|000016a0| 0a 58 65 78 74 65 72 6e | 20 63 68 61 72 20 2a 73 |.Xextern| char *s|
|000016b0| 74 72 64 75 70 28 63 68 | 61 72 20 2a 29 3b 0a 58 |trdup(ch|ar *);.X|
|000016c0| 65 78 74 65 72 6e 20 76 | 6f 69 64 20 73 72 61 6e |extern v|oid sran|
|000016d0| 64 28 69 6e 74 29 2c 20 | 65 78 69 74 28 69 6e 74 |d(int), |exit(int|
|000016e0| 29 3b 0a 58 65 78 74 65 | 72 6e 20 69 6e 74 20 20 |);.Xexte|rn int |
|000016f0| 74 69 6d 65 28 69 6e 74 | 29 3b 0a 58 65 78 74 65 |time(int|);.Xexte|
|00001700| 72 6e 20 63 68 61 72 20 | 74 6f 75 70 70 65 72 28 |rn char |toupper(|
|00001710| 63 68 61 72 29 3b 0a 58 | 65 78 74 65 72 6e 20 63 |char);.X|extern c|
|00001720| 68 61 72 20 2a 67 65 74 | 6c 6f 67 69 6e 28 76 6f |har *get|login(vo|
|00001730| 69 64 29 3b 0a 58 65 78 | 74 65 72 6e 20 76 6f 69 |id);.Xex|tern voi|
|00001740| 64 20 6d 61 69 6c 5f 72 | 65 63 6f 72 64 28 69 6e |d mail_r|ecord(in|
|00001750| 74 2c 69 6e 74 2c 69 6e | 74 5b 5d 29 3b 0a 58 65 |t,int,in|t[]);.Xe|
|00001760| 78 74 65 72 6e 20 76 6f | 69 64 20 61 64 64 5f 73 |xtern vo|id add_s|
|00001770| 63 6f 72 65 5f 72 65 63 | 6f 72 64 28 69 6e 74 2c |core_rec|ord(int,|
|00001780| 69 6e 74 2c 69 6e 74 29 | 3b 0a 58 7d 0a 58 2f 2f |int,int)|;.X}.X//|
|00001790| 20 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | -------|--------|
|000017a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000017b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000017c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000017d0| 2d 2d 2d 2d 2d 2d 0a 58 | 0a 58 65 78 74 65 72 6e |------.X|.Xextern|
|000017e0| 20 63 68 61 72 20 2a 53 | 63 6f 72 65 46 3b 0a 58 | char *S|coreF;.X|
|000017f0| 0a 58 23 64 65 66 69 6e | 65 20 6d 61 78 28 61 2c |.X#defin|e max(a,|
|00001800| 62 29 20 28 61 3e 62 3f | 61 3a 62 29 0a 58 23 64 |b) (a>b?|a:b).X#d|
|00001810| 65 66 69 6e 65 20 6d 69 | 6e 28 61 2c 62 29 20 28 |efine mi|n(a,b) (|
|00001820| 61 3c 62 3f 61 3a 62 29 | 0a 58 0a 58 76 6f 69 64 |a<b?a:b)|.X.Xvoid|
|00001830| 20 63 5f 74 69 6d 65 28 | 69 6e 74 20 26 74 29 20 | c_time(|int &t) |
|00001840| 20 20 20 20 7b 20 74 20 | 3d 20 74 69 6d 65 28 30 | { t |= time(0|
|00001850| 29 3b 20 7d 0a 58 69 6e | 74 20 20 63 5f 6c 69 6e |); }.Xin|t c_lin|
|00001860| 65 73 28 76 6f 69 64 29 | 20 20 20 20 20 20 7b 20 |es(void)| { |
|00001870| 72 65 74 75 72 6e 20 4c | 49 4e 45 53 3b 20 7d 0a |return L|INES; }.|
|00001880| 58 69 6e 74 20 20 63 5f | 63 6f 6c 73 28 76 6f 69 |Xint c_|cols(voi|
|00001890| 64 29 20 20 20 20 20 20 | 20 7b 20 72 65 74 75 72 |d) | { retur|
|000018a0| 6e 20 43 4f 4c 53 3b 20 | 7d 0a 58 76 6f 69 64 20 |n COLS; |}.Xvoid |
|000018b0| 63 5f 6b 65 79 5f 72 61 | 77 28 76 6f 69 64 29 20 |c_key_ra|w(void) |
|000018c0| 20 20 20 7b 20 6e 6f 65 | 63 68 6f 28 29 3b 20 63 | { noe|cho(); c|
|000018d0| 62 72 65 61 6b 28 29 3b | 20 7d 0a 58 76 6f 69 64 |break();| }.Xvoid|
|000018e0| 20 63 5f 72 65 70 61 69 | 6e 74 28 76 6f 69 64 29 | c_repai|nt(void)|
|000018f0| 20 20 20 20 7b 20 63 6c | 65 61 72 6f 6b 28 63 75 | { cl|earok(cu|
|00001900| 72 73 63 72 2c 54 52 55 | 45 29 3b 20 77 72 65 66 |rscr,TRU|E); wref|
|00001910| 72 65 73 68 28 63 75 72 | 73 63 72 29 3b 20 7d 0a |resh(cur|scr); }.|
|00001920| 58 76 6f 69 64 20 63 5f | 61 64 64 69 6e 74 28 69 |Xvoid c_|addint(i|
|00001930| 6e 74 20 6e 29 20 20 20 | 20 7b 20 70 72 69 6e 74 |nt n) | { print|
|00001940| 77 28 22 25 64 22 2c 6e | 29 3b 20 72 65 66 72 65 |w("%d",n|); refre|
|00001950| 73 68 28 29 3b 20 7d 0a | 58 76 6f 69 64 20 63 5f |sh(); }.|Xvoid c_|
|00001960| 69 6e 69 74 73 63 72 28 | 76 6f 69 64 29 20 20 20 |initscr(|void) |
|00001970| 20 7b 20 69 6e 69 74 73 | 63 72 28 29 3b 20 69 64 | { inits|cr(); id|
|00001980| 6c 6f 6b 28 73 74 64 73 | 63 72 2c 54 52 55 45 29 |lok(stds|cr,TRUE)|
|00001990| 3b 20 0a 58 20 20 20 20 | 20 20 20 20 20 20 20 20 |; .X | |
|000019a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 73 63 | | sc|
|000019b0| 72 6f 6c 6c 6f 6b 28 73 | 74 64 73 63 72 2c 54 52 |rollok(s|tdscr,TR|
|000019c0| 55 45 29 2c 20 6e 6c 28 | 29 3b 20 7d 0a 58 76 6f |UE), nl(|); }.Xvo|
|000019d0| 69 64 20 63 5f 63 6c 65 | 61 72 28 76 6f 69 64 29 |id c_cle|ar(void)|
|000019e0| 20 20 20 20 20 20 7b 20 | 63 6c 65 61 72 28 29 3b | { |clear();|
|000019f0| 20 7d 0a 58 76 6f 69 64 | 20 63 5f 65 6e 64 77 69 | }.Xvoid| c_endwi|
|00001a00| 6e 28 76 6f 69 64 29 20 | 20 20 20 20 7b 20 65 6e |n(void) | { en|
|00001a10| 64 77 69 6e 28 29 3b 20 | 7d 0a 58 76 6f 69 64 20 |dwin(); |}.Xvoid |
|00001a20| 63 5f 61 64 64 63 68 28 | 63 68 61 72 20 63 29 20 |c_addch(|char c) |
|00001a30| 20 20 20 7b 20 61 64 64 | 63 68 28 63 29 3b 20 72 | { add|ch(c); r|
|00001a40| 65 66 72 65 73 68 28 29 | 3b 20 7d 0a 58 76 6f 69 |efresh()|; }.Xvoi|
|00001a50| 64 20 63 5f 6d 6f 76 65 | 28 69 6e 74 20 72 2c 20 |d c_move|(int r, |
|00001a60| 69 6e 74 20 63 29 20 20 | 20 7b 20 6d 6f 76 65 28 |int c) | { move(|
|00001a70| 72 2c 63 29 3b 20 72 65 | 66 72 65 73 68 28 29 3b |r,c); re|fresh();|
|00001a80| 20 7d 0a 58 76 6f 69 64 | 20 63 5f 61 64 64 63 68 | }.Xvoid| c_addch|
|00001a90| 5f 61 74 28 63 68 61 72 | 20 78 2c 69 6e 74 20 72 |_at(char| x,int r|
|00001aa0| 2c 20 69 6e 74 20 63 29 | 20 7b 20 6d 6f 76 65 28 |, int c)| { move(|
|00001ab0| 72 2c 63 29 3b 20 61 64 | 64 63 68 28 78 29 3b 20 |r,c); ad|dch(x); |
|00001ac0| 72 65 66 72 65 73 68 28 | 29 3b 20 7d 0a 58 76 6f |refresh(|); }.Xvo|
|00001ad0| 69 64 20 63 5f 63 6c 72 | 73 63 72 28 76 6f 69 64 |id c_clr|scr(void|
|00001ae0| 29 20 20 20 20 20 7b 20 | 63 6c 65 61 72 28 29 3b |) { |clear();|
|00001af0| 20 6d 6f 76 65 28 30 2c | 30 29 3b 20 72 65 66 72 | move(0,|0); refr|
|00001b00| 65 73 68 28 29 3b 20 7d | 0a 58 76 6f 69 64 20 63 |esh(); }|.Xvoid c|
|00001b10| 5f 63 6c 72 65 6f 6c 28 | 76 6f 69 64 29 20 20 20 |_clreol(|void) |
|00001b20| 20 20 7b 20 63 6c 72 74 | 6f 65 6f 6c 28 29 3b 20 | { clrt|oeol(); |
|00001b30| 72 65 66 72 65 73 68 28 | 29 3b 20 7d 0a 58 76 6f |refresh(|); }.Xvo|
|00001b40| 69 64 20 63 5f 67 65 74 | 6b 65 79 28 63 68 61 72 |id c_get|key(char|
|00001b50| 20 26 78 29 20 20 7b 20 | 77 68 69 6c 65 20 28 28 | &x) { |while ((|
|00001b60| 78 3d 67 65 74 63 68 28 | 29 29 20 3d 3d 20 31 32 |x=getch(|)) == 12|
|00001b70| 29 20 63 5f 72 65 70 61 | 69 6e 74 28 29 3b 20 7d |) c_repa|int(); }|
|00001b80| 0a 58 76 6f 69 64 20 63 | 5f 67 65 74 72 65 74 28 |.Xvoid c|_getret(|
|00001b90| 76 6f 69 64 29 20 20 20 | 20 20 7b 20 63 68 61 72 |void) | { char|
|00001ba0| 20 63 3b 20 64 6f 20 7b | 63 5f 67 65 74 6b 65 79 | c; do {|c_getkey|
|00001bb0| 28 63 29 3b 7d 20 77 68 | 69 6c 65 20 28 63 21 3d |(c);} wh|ile (c!=|
|00001bc0| 27 5c 6e 27 29 3b 7d 0a | 58 2f 2f 20 2d 2d 2d 2d |'\n');}.|X// ----|
|00001bd0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001be0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001bf0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001c00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001c10| 2d 0a 58 0a 58 63 6f 6e | 73 74 20 63 68 61 72 0a |-.X.Xcon|st char.|
|00001c20| 58 20 20 77 61 6c 6c 20 | 20 3d 20 27 23 27 20 2c |X wall | = '#' ,|
|00001c30| 20 20 62 6c 61 6e 6b 20 | 3d 20 27 2e 27 20 2c 0a | blank |= '.' ,.|
|00001c40| 58 20 20 62 6c 61 63 6b | 20 3d 20 27 58 27 20 2c |X black| = 'X' ,|
|00001c50| 20 20 77 68 69 74 65 20 | 3d 20 27 4f 27 20 2c 20 | white |= 'O' , |
|00001c60| 20 78 6d 61 72 6b 20 3d | 20 27 2a 27 20 3b 0a 58 | xmark =| '*' ;.X|
|00001c70| 0a 58 63 6f 6e 73 74 20 | 69 6e 74 0a 58 20 20 62 |.Xconst |int.X b|
|00001c80| 64 78 20 3d 20 31 39 20 | 2c 20 20 20 20 20 20 62 |dx = 19 |, b|
|00001c90| 64 79 20 3d 20 31 20 2c | 0a 58 20 20 6d 73 67 5f |dy = 1 ,|.X msg_|
|00001ca0| 72 6f 77 20 3d 20 31 20 | 2c 20 20 20 6e 61 6d 65 |row = 1 |, name|
|00001cb0| 5f 72 6f 77 20 3d 20 32 | 20 2c 20 20 6d 61 72 6b |_row = 2| , mark|
|00001cc0| 5f 72 6f 77 20 3d 20 33 | 20 2c 20 6d 73 67 5f 77 |_row = 3| , msg_w|
|00001cd0| 69 64 74 68 20 3d 20 31 | 36 2c 0a 58 20 20 62 64 |idth = 1|6,.X bd|
|00001ce0| 77 69 64 74 68 20 3d 20 | 32 31 20 2c 20 20 62 64 |width = |21 , bd|
|00001cf0| 6c 65 6e 67 74 68 20 3d | 20 34 34 30 2c 0a 58 20 |length =| 440,.X |
|00001d00| 20 73 74 61 72 74 5f 70 | 6f 73 20 3d 20 32 32 2c | start_p|os = 22,|
|00001d10| 20 65 6e 64 5f 70 6f 73 | 20 3d 20 34 31 38 2c 20 | end_pos| = 418, |
|00001d20| 20 63 65 6e 74 65 72 5f | 70 6f 69 6e 74 20 3d 20 | center_|point = |
|00001d30| 32 32 30 3b 0a 58 0a 58 | 63 6f 6e 73 74 20 69 6e |220;.X.X|const in|
|00001d40| 74 20 6d 73 67 5f 63 6f | 6c 5b 32 5d 20 3d 20 7b |t msg_co|l[2] = {|
|00001d50| 30 2c 36 33 7d 3b 0a 58 | 0a 58 65 78 74 65 72 6e |0,63};.X|.Xextern|
|00001d60| 20 63 68 61 72 20 62 6f | 61 72 64 5b 62 64 6c 65 | char bo|ard[bdle|
|00001d70| 6e 67 74 68 2b 31 5d 3b | 20 20 20 20 20 20 20 20 |ngth+1];| |
|00001d80| 20 20 2f 2f 20 69 6e 20 | 69 6e 69 74 62 64 2e 43 | // in |initbd.C|
|00001d90| 0a 58 0a 58 63 68 61 72 | 20 2a 62 61 72 5f 73 74 |.X.Xchar| *bar_st|
|00001da0| 72 20 3d 20 22 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |r = "---|--------|
|00001db0| 2d 2d 2d 2d 2d 22 20 3b | 0a 58 0a 58 63 68 61 72 |-----" ;|.X.Xchar|
|00001dc0| 20 6d 61 72 6b 5f 73 74 | 72 5b 32 5d 5b 6d 73 67 | mark_st|r[2][msg|
|00001dd0| 5f 77 69 64 74 68 2b 31 | 5d 3b 0a 58 0a 58 63 68 |_width+1|];.X.Xch|
|00001de0| 61 72 20 20 2a 28 63 6f | 6d 6d 61 6e 64 5f 6b 65 |ar *(co|mmand_ke|
|00001df0| 79 73 5b 32 5d 29 20 3d | 20 7b 0a 58 22 5b 52 5d |ys[2]) =| {.X"[R]|
|00001e00| 3a 72 65 64 72 61 77 20 | 5b 49 4a 4b 4c 31 2e 2e |:redraw |[IJKL1..|
|00001e10| 39 5d 3a 6d 6f 76 65 20 | 5b 52 45 54 55 52 4e 5d |9]:move |[RETURN]|
|00001e20| 3a 73 65 74 20 5b 53 5d | 3a 73 6f 75 6e 64 20 5b |:set [S]|:sound [|
|00001e30| 48 5d 3a 68 69 6e 74 20 | 5b 55 5d 3a 75 6e 64 6f |H]:hint |[U]:undo|
|00001e40| 20 5b 51 5d 3a 71 75 69 | 74 22 2c 0a 58 22 20 20 | [Q]:qui|t",.X" |
|00001e50| 20 5b 52 5d 3a 72 65 64 | 72 61 77 20 20 20 20 5b | [R]:red|raw [|
|00001e60| 49 4a 4b 4c 31 2e 2e 39 | 5d 3a 6d 6f 76 65 20 20 |IJKL1..9|]:move |
|00001e70| 20 20 5b 52 45 54 55 52 | 4e 5d 3a 73 65 74 20 20 | [RETUR|N]:set |
|00001e80| 20 20 5b 53 5d 3a 73 6f | 75 6e 64 20 20 20 20 5b | [S]:so|und [|
|00001e90| 51 5d 3a 71 75 69 74 22 | 7d 20 3b 0a 58 0a 58 69 |Q]:quit"|} ;.X.Xi|
|00001ea0| 6e 74 20 20 20 74 69 6d | 65 31 2c 74 69 6d 65 32 |nt tim|e1,time2|
|00001eb0| 3b 0a 58 69 6e 74 20 20 | 20 70 6c 61 79 65 72 5f |;.Xint | player_|
|00001ec0| 74 69 6d 65 5b 32 5d 3b | 0a 58 63 68 61 72 20 20 |time[2];|.Xchar |
|00001ed0| 70 6c 61 79 65 72 5f 63 | 6f 6c 6f 72 5b 32 5d 3b |player_c|olor[2];|
|00001ee0| 0a 58 69 6e 74 20 20 20 | 65 73 63 2c 62 61 63 6b |.Xint |esc,back|
|00001ef0| 3b 20 20 20 20 20 20 20 | 20 20 2f 2f 20 62 6f 6f |; | // boo|
|00001f00| 6c 65 61 6e 0a 58 63 68 | 61 72 20 20 62 64 6d 61 |lean.Xch|ar bdma|
|00001f10| 72 6b 5b 34 34 31 5d 3b | 20 20 20 20 20 20 2f 2f |rk[441];| //|
|00001f20| 20 62 6f 6f 6c 65 61 6e | 0a 58 63 68 61 72 20 20 | boolean|.Xchar |
|00001f30| 62 65 6c 6c 3b 0a 58 0a | 58 2f 2f 20 2d 2d 2d 2d |bell;.X.|X// ----|
|00001f40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001f50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001f60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001f70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001f80| 2d 0a 58 73 74 61 74 69 | 63 20 63 68 61 72 20 20 |-.Xstati|c char |
|00001f90| 20 20 20 63 6f 6d 70 75 | 74 65 72 5f 6e 61 6d 65 | compu|ter_name|
|00001fa0| 5b 32 30 5d 3b 0a 58 73 | 74 61 74 69 63 20 63 68 |[20];.Xs|tatic ch|
|00001fb0| 61 72 20 20 20 20 20 2a | 77 61 72 6e 69 6e 67 5f |ar *|warning_|
|00001fc0| 6d 73 67 3b 0a 58 73 74 | 61 74 69 63 20 69 6e 74 |msg;.Xst|atic int|
|00001fd0| 20 20 20 20 20 20 67 61 | 6d 65 5f 6f 76 65 72 2c | ga|me_over,|
|00001fe0| 20 77 61 72 6e 69 6e 67 | 5f 6d 73 67 5f 6f 6e 2c | warning|_msg_on,|
|00001ff0| 20 63 68 61 6c 6c 65 6e | 67 69 6e 67 3b 0a 58 73 | challen|ging;.Xs|
|00002000| 74 61 74 69 63 20 69 6e | 74 20 20 20 20 20 20 6c |tatic in|t l|
|00002010| 61 73 74 5f 6d 6f 76 65 | 5f 72 65 63 2c 20 6d 6f |ast_move|_rec, mo|
|00002020| 76 65 5f 72 65 63 5b 33 | 36 30 5d 3b 0a 58 0a 58 |ve_rec[3|60];.X.X|
|00002030| 23 64 65 66 69 6e 65 20 | 74 68 65 5f 6c 61 73 74 |#define |the_last|
|00002040| 5f 6d 6f 76 65 20 6d 6f | 76 65 5f 72 65 63 5b 6c |_move mo|ve_rec[l|
|00002050| 61 73 74 5f 6d 6f 76 65 | 5f 72 65 63 5d 0a 58 0a |ast_move|_rec].X.|
|00002060| 58 73 74 61 74 69 63 20 | 63 68 61 72 20 20 20 20 |Xstatic |char |
|00002070| 20 2a 28 70 6c 61 79 65 | 72 5f 6e 61 6d 65 5b 32 | *(playe|r_name[2|
|00002080| 5d 29 3b 0a 58 0a 58 69 | 6e 74 20 20 20 20 20 20 |]);.X.Xi|nt |
|00002090| 20 20 20 20 73 74 65 70 | 2c 20 70 6c 61 79 65 72 | step|, player|
|000020a0| 3b 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2f |; | /|
|000020b0| 2a 20 75 73 65 64 20 69 | 6e 20 6d 61 6b 65 35 2e |* used i|n make5.|
|000020c0| 43 20 20 2a 2f 0a 58 69 | 6e 74 20 20 20 20 20 20 |C */.Xi|nt |
|000020d0| 20 20 20 20 6d 69 6e 5f | 64 65 70 74 68 2c 20 6d | min_|depth, m|
|000020e0| 61 78 5f 64 65 70 74 68 | 3b 20 20 20 20 20 20 2f |ax_depth|; /|
|000020f0| 2a 20 75 73 65 64 20 69 | 6e 20 73 65 6c 65 63 74 |* used i|n select|
|00002100| 2e 43 20 2a 2f 0a 58 0a | 58 2f 2f 20 2d 2d 2d 2d |.C */.X.|X// ----|
|00002110| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002120| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002130| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002140| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002150| 2d 0a 58 65 78 74 65 72 | 6e 20 22 43 22 20 76 6f |-.Xexter|n "C" vo|
|00002160| 69 64 20 69 6e 69 74 5f | 64 61 74 61 28 76 6f 69 |id init_|data(voi|
|00002170| 64 29 3b 20 20 20 20 20 | 20 20 2f 2a 20 69 6e 20 |d); | /* in |
|00002180| 6d 61 6b 65 35 2e 43 20 | 2a 2f 0a 58 65 78 74 65 |make5.C |*/.Xexte|
|00002190| 72 6e 20 22 43 22 20 63 | 68 61 72 20 2a 67 65 74 |rn "C" c|har *get|
|000021a0| 5f 77 61 72 6e 69 6e 67 | 28 69 6e 74 2c 69 6e 74 |_warning|(int,int|
|000021b0| 29 3b 0a 58 65 78 74 65 | 72 6e 20 22 43 22 20 69 |);.Xexte|rn "C" i|
|000021c0| 6e 74 20 20 69 73 5f 67 | 61 6d 65 5f 6f 76 65 72 |nt is_g|ame_over|
|000021d0| 28 69 6e 74 2c 69 6e 74 | 29 3b 0a 58 65 78 74 65 |(int,int|);.Xexte|
|000021e0| 72 6e 20 22 43 22 20 76 | 6f 69 64 20 73 65 74 5f |rn "C" v|oid set_|
|000021f0| 6f 6e 28 69 6e 74 2c 69 | 6e 74 29 2c 20 74 61 6b |on(int,i|nt), tak|
|00002200| 65 5f 6f 75 74 28 69 6e | 74 29 3b 0a 58 65 78 74 |e_out(in|t);.Xext|
|00002210| 65 72 6e 20 22 43 22 20 | 69 6e 74 20 20 63 6f 6d |ern "C" |int com|
|00002220| 70 75 74 65 72 5f 6d 6f | 76 65 28 69 6e 74 29 2c |puter_mo|ve(int),|
|00002230| 20 63 6f 6d 70 75 74 65 | 72 5f 73 75 67 67 65 73 | compute|r_sugges|
|00002240| 74 28 69 6e 74 29 3b 0a | 58 0a 58 73 74 61 74 69 |t(int);.|X.Xstati|
|00002250| 63 20 76 6f 69 64 20 73 | 68 6f 77 5f 63 6f 6d 6d |c void s|how_comm|
|00002260| 61 6e 64 5f 6b 65 79 73 | 28 76 6f 69 64 29 3b 0a |and_keys|(void);.|
|00002270| 58 73 74 61 74 69 63 20 | 76 6f 69 64 20 73 68 6f |Xstatic |void sho|
|00002280| 77 5f 68 69 67 68 5f 73 | 63 6f 72 65 28 69 6e 74 |w_high_s|core(int|
|00002290| 29 3b 0a 58 2f 2f 20 2d | 2d 2d 2d 2d 2d 2d 2d 2d |);.X// -|--------|
|000022a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000022b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000022c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000022d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 0a 58 2f 2f 20 |--------|---.X// |
|000022e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000022f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002300| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002310| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002320| 2d 2d 2d 2d 0a 58 2f 2f | 20 20 20 20 20 20 42 6f |----.X//| Bo|
|00002330| 61 72 64 20 63 6f 6f 72 | 64 69 6e 61 74 65 73 20 |ard coor|dinates |
|00002340| 63 6f 6d 70 75 74 61 74 | 69 6f 6e 0a 58 0a 58 2f |computat|ion.X.X/|
|00002350| 2f 20 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/ ------|--------|
|00002360| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002370| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002380| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002390| 2d 2d 2d 2d 2d 2d 0a 58 | 69 6e 6c 69 6e 65 20 69 |------.X|inline i|
|000023a0| 6e 74 20 78 5f 63 6f 6c | 28 69 6e 74 20 78 29 20 |nt x_col|(int x) |
|000023b0| 7b 0a 58 20 20 72 65 74 | 75 72 6e 20 28 62 64 78 |{.X ret|urn (bdx|
|000023c0| 20 2b 20 28 28 78 20 25 | 20 62 64 77 69 64 74 68 | + ((x %| bdwidth|
|000023d0| 29 20 2a 20 32 29 29 20 | 3b 0a 58 7d 0a 58 2f 2f |) * 2)) |;.X}.X//|
|000023e0| 20 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | -------|--------|
|000023f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002400| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002410| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002420| 2d 2d 2d 2d 2d 0a 58 69 | 6e 6c 69 6e 65 20 69 6e |-----.Xi|nline in|
|00002430| 74 20 78 5f 72 6f 77 28 | 69 6e 74 20 78 29 20 7b |t x_row(|int x) {|
|00002440| 0a 58 20 20 72 65 74 75 | 72 6e 20 28 62 64 79 20 |.X retu|rn (bdy |
|00002450| 2b 20 28 78 20 2f 20 62 | 64 77 69 64 74 68 29 29 |+ (x / b|dwidth))|
|00002460| 20 3b 0a 58 7d 0a 58 0a | 58 2f 2f 20 2d 2d 2d 2d | ;.X}.X.|X// ----|
|00002470| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002480| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002490| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000024a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000024b0| 0a 58 2f 2f 20 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.X// ---|--------|
|000024c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000024d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000024e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000024f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 0a 58 2f 2f 20 20 20 |--------|-.X// |
|00002500| 20 20 20 53 69 6d 70 6c | 65 20 63 68 61 72 61 63 | Simpl|e charac|
|00002510| 74 65 72 20 61 6e 64 20 | 73 74 72 69 6e 67 20 49 |ter and |string I|
|00002520| 2f 4f 0a 58 0a 58 69 6e | 6c 69 6e 65 20 76 6f 69 |/O.X.Xin|line voi|
|00002530| 64 20 6d 6f 76 65 74 6f | 28 69 6e 74 20 78 29 20 |d moveto|(int x) |
|00002540| 7b 0a 58 20 20 63 5f 6d | 6f 76 65 28 78 5f 72 6f |{.X c_m|ove(x_ro|
|00002550| 77 28 78 29 2c 78 5f 63 | 6f 6c 28 78 29 29 20 3b |w(x),x_c|ol(x)) ;|
|00002560| 0a 58 7d 0a 58 2f 2f 20 | 2d 2d 2d 2d 2d 2d 2d 2d |.X}.X// |--------|
|00002570| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002580| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002590| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000025a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0a 58 76 6f |--------|----.Xvo|
|000025b0| 69 64 20 77 72 69 74 65 | 5f 62 6c 61 6e 6b 73 28 |id write|_blanks(|
|000025c0| 69 6e 74 20 6e 29 20 7b | 0a 58 20 20 66 6f 72 20 |int n) {|.X for |
|000025d0| 28 69 6e 74 20 69 3d 30 | 3b 20 69 3c 6e 3b 20 69 |(int i=0|; i<n; i|
|000025e0| 2b 2b 29 20 63 5f 61 64 | 64 63 68 28 27 20 27 29 |++) c_ad|dch(' ')|
|000025f0| 3b 0a 58 7d 0a 58 2f 2f | 20 2d 2d 2d 2d 2d 2d 2d |;.X}.X//| -------|
|00002600| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002610| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002620| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002630| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 0a 58 |--------|------.X|
|00002640| 76 6f 69 64 20 72 61 6e | 64 6f 6d 69 7a 65 28 76 |void ran|domize(v|
|00002650| 6f 69 64 29 20 7b 0a 58 | 69 6e 74 20 74 3b 0a 58 |oid) {.X|int t;.X|
|00002660| 20 20 63 5f 74 69 6d 65 | 28 74 29 3b 20 73 72 61 | c_time|(t); sra|
|00002670| 6e 64 28 74 29 3b 0a 58 | 7d 0a 58 2f 2f 20 2d 2d |nd(t);.X|}.X// --|
|00002680| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002690| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000026a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000026b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000026c0| 2d 2d 0a 58 76 6f 69 64 | 20 63 6c 65 61 6e 5f 73 |--.Xvoid| clean_s|
|000026d0| 63 72 65 65 6e 28 69 6e | 74 20 72 2c 20 69 6e 74 |creen(in|t r, int|
|000026e0| 20 63 2c 20 69 6e 74 20 | 77 29 20 7b 0a 58 20 20 | c, int |w) {.X |
|000026f0| 63 5f 6d 6f 76 65 28 72 | 2c 63 29 3b 20 77 72 69 |c_move(r|,c); wri|
|00002700| 74 65 5f 62 6c 61 6e 6b | 73 28 77 29 3b 0a 58 7d |te_blank|s(w);.X}|
|00002710| 0a 58 2f 2f 20 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.X// ---|--------|
|00002720| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002730| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002740| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002750| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 0a 58 76 6f 69 64 20 |--------|-.Xvoid |
|00002760| 63 6c 65 61 72 5f 6c 69 | 6e 65 28 69 6e 74 20 72 |clear_li|ne(int r|
|00002770| 29 20 7b 0a 58 20 20 63 | 5f 6d 6f 76 65 28 72 2c |) {.X c|_move(r,|
|00002780| 30 29 3b 20 63 5f 63 6c | 72 65 6f 6c 28 29 3b 0a |0); c_cl|reol();.|
|00002790| 58 7d 0a 58 2f 2f 20 2d | 2d 2d 2d 2d 2d 2d 2d 2d |X}.X// -|--------|
|000027a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000027b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000027c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000027d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 0a 58 73 74 61 |--------|---.Xsta|
|000027e0| 74 69 63 20 76 6f 69 64 | 20 77 72 69 74 65 5f 73 |tic void| write_s|
|000027f0| 74 72 28 63 68 61 72 20 | 2a 78 29 20 7b 0a 58 20 |tr(char |*x) {.X |
|00002800| 20 77 68 69 6c 65 20 28 | 2a 78 29 20 7b 63 5f 61 | while (|*x) {c_a|
|00002810| 64 64 63 68 28 2a 78 29 | 3b 20 78 2b 2b 3b 20 7d |ddch(*x)|; x++; }|
|00002820| 0a 58 7d 0a 58 2f 2f 20 | 2d 2d 2d 2d 2d 2d 2d 2d |.X}.X// |--------|
|00002830| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002840| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002850| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002860| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0a 58 76 6f |--------|----.Xvo|
|00002870| 69 64 20 77 72 69 74 65 | 5f 73 74 72 5f 61 74 28 |id write|_str_at(|
|00002880| 69 6e 74 20 72 2c 20 69 | 6e 74 20 63 2c 20 63 68 |int r, i|nt c, ch|
|00002890| 61 72 20 2a 78 29 20 7b | 0a 58 20 20 63 5f 6d 6f |ar *x) {|.X c_mo|
|000028a0| 76 65 28 72 2c 63 29 3b | 20 77 72 69 74 65 5f 73 |ve(r,c);| write_s|
|000028b0| 74 72 28 78 29 3b 0a 58 | 7d 0a 58 2f 2f 20 2d 2d |tr(x);.X|}.X// --|
|000028c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000028d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000028e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000028f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002900| 2d 2d 0a 58 76 6f 69 64 | 20 74 77 6f 5f 64 69 67 |--.Xvoid| two_dig|
|00002910| 69 74 28 69 6e 74 20 6e | 29 20 7b 0a 58 20 20 69 |it(int n|) {.X i|
|00002920| 66 20 28 6e 20 3c 20 31 | 30 29 20 63 5f 61 64 64 |f (n < 1|0) c_add|
|00002930| 63 68 28 27 30 27 29 3b | 0a 58 20 20 63 5f 61 64 |ch('0');|.X c_ad|
|00002940| 64 69 6e 74 28 6e 29 3b | 0a 58 7d 0a 58 2f 2f 20 |dint(n);|.X}.X// |
|00002950| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002960| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002970| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002980| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002990| 2d 2d 2d 2d 0a 58 76 6f | 69 64 20 64 69 73 70 6c |----.Xvo|id displ|
|000029a0| 61 79 5f 74 69 6d 65 28 | 69 6e 74 20 70 2c 20 69 |ay_time(|int p, i|
|000029b0| 6e 74 20 74 29 20 7b 0a | 58 20 20 63 5f 6d 6f 76 |nt t) {.|X c_mov|
|000029c0| 65 28 30 2c 6d 73 67 5f | 63 6f 6c 5b 70 5d 2b 38 |e(0,msg_|col[p]+8|
|000029d0| 29 3b 0a 58 20 20 70 6c | 61 79 65 72 5f 74 69 6d |);.X pl|ayer_tim|
|000029e0| 65 5b 70 5d 20 2b 3d 20 | 74 3b 0a 58 20 20 63 5f |e[p] += |t;.X c_|
|000029f0| 61 64 64 63 68 28 27 28 | 27 29 3b 20 20 74 77 6f |addch('(|'); two|
|00002a00| 5f 64 69 67 69 74 28 70 | 6c 61 79 65 72 5f 74 69 |_digit(p|layer_ti|
|00002a10| 6d 65 5b 70 5d 20 2f 20 | 36 30 29 3b 0a 58 20 20 |me[p] / |60);.X |
|00002a20| 63 5f 61 64 64 63 68 28 | 27 3a 27 29 3b 20 20 74 |c_addch(|':'); t|
|00002a30| 77 6f 5f 64 69 67 69 74 | 28 70 6c 61 79 65 72 5f |wo_digit|(player_|
|00002a40| 74 69 6d 65 5b 70 5d 20 | 25 20 36 30 29 3b 0a 58 |time[p] |% 60);.X|
|00002a50| 20 20 63 5f 61 64 64 63 | 68 28 27 29 27 29 3b 0a | c_addc|h(')');.|
|00002a60| 58 7d 0a 58 0a 58 2f 2f | 20 2d 2d 2d 2d 2d 2d 2d |X}.X.X//| -------|
|00002a70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002a80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002a90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002aa0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 0a 58 2f |--------|-----.X/|
|00002ab0| 2f 20 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/ ------|--------|
|00002ac0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002ad0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002ae0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002af0| 2d 2d 2d 2d 2d 2d 0a 58 | 2f 2f 20 20 20 20 20 20 |------.X|// |
|00002b00| 48 69 67 68 65 72 2d 6c | 65 76 65 6c 20 49 2f 4f |Higher-l|evel I/O|
|00002b10| 0a 58 0a 58 69 6e 74 20 | 79 65 73 5f 6e 6f 28 69 |.X.Xint |yes_no(i|
|00002b20| 6e 74 20 72 2c 20 63 68 | 61 72 20 2a 6d 73 67 29 |nt r, ch|ar *msg)|
|00002b30| 20 7b 0a 58 20 20 63 68 | 61 72 20 78 3b 0a 58 20 | {.X ch|ar x;.X |
|00002b40| 20 64 6f 20 7b 0a 58 20 | 20 20 20 63 6c 65 61 72 | do {.X | clear|
|00002b50| 5f 6c 69 6e 65 28 72 29 | 3b 0a 58 20 20 20 20 77 |_line(r)|;.X w|
|00002b60| 72 69 74 65 5f 73 74 72 | 28 6d 73 67 29 3b 20 77 |rite_str|(msg); w|
|00002b70| 72 69 74 65 5f 73 74 72 | 28 22 20 28 79 2f 6e 29 |rite_str|(" (y/n)|
|00002b80| 22 29 3b 20 63 5f 61 64 | 64 63 68 28 27 20 27 29 |"); c_ad|dch(' ')|
|00002b90| 3b 20 63 5f 67 65 74 6b | 65 79 28 78 29 20 3b 0a |; c_getk|ey(x) ;.|
|00002ba0| 58 20 20 20 20 78 20 3d | 20 74 6f 75 70 70 65 72 |X x =| toupper|
|00002bb0| 28 78 29 20 3b 0a 58 20 | 20 7d 20 77 68 69 6c 65 |(x) ;.X | } while|
|00002bc0| 20 28 78 20 21 3d 20 27 | 59 27 20 26 26 20 78 20 | (x != '|Y' && x |
|00002bd0| 21 3d 20 27 4e 27 29 3b | 0a 58 20 20 63 5f 61 64 |!= 'N');|.X c_ad|
|00002be0| 64 63 68 28 78 29 3b 0a | 58 20 20 72 65 74 75 72 |dch(x);.|X retur|
|00002bf0| 6e 20 28 78 20 3d 3d 20 | 27 59 27 29 3b 0a 58 7d |n (x == |'Y');.X}|
|00002c00| 0a 58 2f 2f 20 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.X// ---|--------|
|00002c10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002c20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002c30| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002c40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 0a 58 63 68 61 72 20 |--------|-.Xchar |
|00002c50| 2a 67 65 74 5f 6e 61 6d | 65 28 29 20 7b 20 72 65 |*get_nam|e() { re|
|00002c60| 74 75 72 6e 20 28 67 65 | 74 6c 6f 67 69 6e 28 29 |turn (ge|tlogin()|
|00002c70| 29 3b 20 7d 0a 58 0a 58 | 2f 2f 20 2d 2d 2d 2d 2d |); }.X.X|// -----|
|00002c80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002c90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002ca0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002cb0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0a |--------|-------.|
|00002cc0| 58 2f 2f 20 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |X// ----|--------|
|00002cd0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002ce0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002cf0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002d00| 2d 2d 2d 2d 2d 2d 2d 2d | 0a 58 2f 2f 20 20 20 20 |--------|.X// |
|00002d10| 20 20 4d 61 72 6b 73 20 | 6f 6e 20 74 68 65 20 42 | Marks |on the B|
|00002d20| 6f 61 72 64 0a 58 0a 58 | 69 6e 6c 69 6e 65 20 63 |oard.X.X|inline c|
|00002d30| 68 61 72 20 78 5f 72 6f | 77 6d 61 72 6b 28 69 6e |har x_ro|wmark(in|
|00002d40| 74 20 78 29 20 7b 0a 58 | 20 20 72 65 74 75 72 6e |t x) {.X| return|
|00002d50| 20 28 27 41 27 20 2b 20 | 28 78 2f 62 64 77 69 64 | ('A' + |(x/bdwid|
|00002d60| 74 68 29 20 2d 20 31 29 | 20 3b 0a 58 7d 0a 58 2f |th) - 1)| ;.X}.X/|
|00002d70| 2f 20 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/ ------|--------|
|00002d80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002d90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002da0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002db0| 2d 2d 2d 2d 2d 2d 0a 58 | 69 6e 6c 69 6e 65 20 63 |------.X|inline c|
|00002dc0| 68 61 72 20 78 5f 63 6f | 6c 6d 61 72 6b 28 69 6e |har x_co|lmark(in|
|00002dd0| 74 20 78 29 20 7b 0a 58 | 20 20 72 65 74 75 72 6e |t x) {.X| return|
|00002de0| 20 28 27 61 27 20 2b 20 | 28 78 25 62 64 77 69 64 | ('a' + |(x%bdwid|
|00002df0| 74 68 29 20 2d 20 31 29 | 20 3b 0a 58 7d 0a 58 2f |th) - 1)| ;.X}.X/|
|00002e00| 2f 20 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/ ------|--------|
|00002e10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002e20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002e30| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002e40| 2d 2d 2d 2d 2d 2d 0a 58 | 76 6f 69 64 20 6d 61 72 |------.X|void mar|
|00002e50| 6b 6f 6e 28 69 6e 74 20 | 78 2c 20 63 68 61 72 20 |kon(int |x, char |
|00002e60| 63 29 20 7b 0a 58 20 20 | 6d 6f 76 65 74 6f 28 78 |c) {.X |moveto(x|
|00002e70| 29 20 3b 20 20 63 5f 61 | 64 64 63 68 28 63 29 3b |) ; c_a|ddch(c);|
|00002e80| 20 20 6d 6f 76 65 74 6f | 28 78 29 3b 0a 58 7d 0a | moveto|(x);.X}.|
|00002e90| 58 2f 2f 20 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |X// ----|--------|
|00002ea0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002eb0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002ec0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002ed0| 2d 2d 2d 2d 2d 2d 2d 2d | 0a 58 76 6f 69 64 20 72 |--------|.Xvoid r|
|00002ee0| 65 73 65 74 6d 61 72 6b | 28 69 6e 74 20 78 29 20 |esetmark|(int x) |
|00002ef0| 7b 20 20 20 20 20 20 20 | 20 20 2f 2f 20 20 72 65 |{ | // re|
|00002f00| 73 65 74 20 6d 61 72 6b | 73 20 6f 6e 20 74 68 65 |set mark|s on the|
|00002f10| 20 73 63 72 65 65 6e 0a | 58 20 20 69 66 20 28 62 | screen.|X if (b|
|00002f20| 64 6d 61 72 6b 5b 78 5d | 29 20 20 6d 61 72 6b 6f |dmark[x]|) marko|
|00002f30| 6e 28 78 2c 78 6d 61 72 | 6b 29 3b 0a 58 20 20 65 |n(x,xmar|k);.X e|
|00002f40| 6c 73 65 20 6d 61 72 6b | 6f 6e 28 78 2c 62 6c 61 |lse mark|on(x,bla|
|00002f50| 6e 6b 29 3b 0a 58 7d 0a | 58 2f 2f 20 2d 2d 2d 2d |nk);.X}.|X// ----|
|00002f60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002f70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002f80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002f90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002fa0| 0a 58 76 6f 69 64 20 63 | 6c 72 5f 6d 61 72 6b 28 |.Xvoid c|lr_mark(|
|00002fb0| 29 20 7b 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |) { | |
|00002fc0| 20 20 2f 2a 20 20 63 6c | 65 61 72 20 6d 61 72 6b | /* cl|ear mark|
|00002fd0| 73 20 6f 6e 20 74 68 65 | 20 73 63 72 65 65 6e 20 |s on the| screen |
|00002fe0| 2a 2f 0a 58 20 20 66 6f | 72 20 28 69 6e 74 20 69 |*/.X fo|r (int i|
|00002ff0| 3d 73 74 61 72 74 5f 70 | 6f 73 3b 20 69 3c 3d 65 |=start_p|os; i<=e|
|00003000| 6e 64 5f 70 6f 73 3b 20 | 69 2b 2b 29 0a 58 20 20 |nd_pos; |i++).X |
|00003010| 20 20 69 66 20 28 62 64 | 6d 61 72 6b 5b 69 5d 29 | if (bd|mark[i])|
|00003020| 20 7b 0a 58 20 20 20 20 | 20 20 62 64 6d 61 72 6b | {.X | bdmark|
|00003030| 5b 69 5d 20 3d 20 30 3b | 0a 58 20 20 20 20 20 20 |[i] = 0;|.X |
|00003040| 6d 61 72 6b 6f 6e 28 69 | 2c 62 6f 61 72 64 5b 69 |markon(i|,board[i|
|00003050| 5d 29 20 3b 0a 58 20 20 | 20 20 7d 0a 58 7d 0a 58 |]) ;.X | }.X}.X|
|00003060| 2f 2f 20 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |// -----|--------|
|00003070| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003080| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003090| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000030a0| 2d 2d 2d 2d 2d 2d 2d 2d | 0a 58 76 6f 69 64 20 6d |--------|.Xvoid m|
|000030b0| 61 72 6b 78 28 69 6e 74 | 20 70 2c 20 69 6e 74 20 |arkx(int| p, int |
|000030c0| 78 2c 20 69 6e 74 20 69 | 2c 20 69 6e 74 20 26 73 |x, int i|, int &s|
|000030d0| 77 29 20 7b 0a 58 20 20 | 73 77 20 3d 20 69 20 3b |w) {.X |sw = i ;|
|000030e0| 0a 58 20 20 69 66 20 28 | 62 6f 61 72 64 5b 78 5d |.X if (|board[x]|
|000030f0| 20 3d 3d 20 62 6c 61 6e | 6b 29 0a 58 20 20 20 20 | == blan|k).X |
|00003100| 20 20 20 69 66 20 28 73 | 77 20 3d 3d 20 31 29 20 | if (s|w == 1) |
|00003110| 6d 61 72 6b 6f 6e 28 78 | 2c 70 6c 61 79 65 72 5f |markon(x|,player_|
|00003120| 63 6f 6c 6f 72 5b 70 5d | 29 3b 0a 58 20 20 20 20 |color[p]|);.X |
|00003130| 20 20 20 65 6c 73 65 20 | 20 20 20 20 20 20 20 20 | else | |
|00003140| 72 65 73 65 74 6d 61 72 | 6b 28 78 29 3b 0a 58 20 |resetmar|k(x);.X |
|00003150| 20 65 6c 73 65 20 6d 61 | 72 6b 6f 6e 28 78 2c 62 | else ma|rkon(x,b|
|00003160| 6f 61 72 64 5b 78 5d 29 | 20 3b 0a 58 7d 0a 58 2f |oard[x])| ;.X}.X/|
|00003170| 2f 20 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/ ------|--------|
|00003180| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003190| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000031a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000031b0| 2d 2d 2d 2d 2d 2d 2d 0a | 58 73 74 61 74 69 63 20 |-------.|Xstatic |
|000031c0| 76 6f 69 64 20 72 65 64 | 72 61 77 5f 62 6f 61 72 |void red|raw_boar|
|000031d0| 64 28 29 0a 58 7b 20 20 | 20 69 6e 74 20 69 2c 6a |d().X{ | int i,j|
|000031e0| 2c 6e 3b 0a 58 0a 58 20 | 20 63 5f 63 6c 72 73 63 |,n;.X.X | c_clrsc|
|000031f0| 72 28 29 3b 0a 58 20 20 | 63 5f 6d 6f 76 65 28 62 |r();.X |c_move(b|
|00003200| 64 79 2c 62 64 78 29 3b | 0a 58 20 20 66 6f 72 28 |dy,bdx);|.X for(|
|00003210| 69 3d 32 2c 6e 3d 62 64 | 77 69 64 74 68 2a 32 3b |i=2,n=bd|width*2;|
|00003220| 20 69 3c 3d 6e 3b 20 69 | 2b 2b 29 20 63 5f 61 64 | i<=n; i|++) c_ad|
|00003230| 64 63 68 28 77 61 6c 6c | 29 3b 0a 58 20 20 66 6f |dch(wall|);.X fo|
|00003240| 72 28 69 3d 62 64 77 69 | 64 74 68 2c 6e 3d 62 64 |r(i=bdwi|dth,n=bd|
|00003250| 6c 65 6e 67 74 68 2d 62 | 64 77 69 64 74 68 3b 20 |length-b|dwidth; |
|00003260| 69 3c 3d 6e 3b 20 69 2b | 2b 29 20 7b 0a 58 20 20 |i<=n; i+|+) {.X |
|00003270| 20 20 20 20 20 20 6a 3d | 69 25 62 64 77 69 64 74 | j=|i%bdwidt|
|00003280| 68 3b 0a 58 20 20 20 20 | 20 20 20 20 69 66 20 28 |h;.X | if (|
|00003290| 6a 3d 3d 30 20 7c 7c 20 | 6a 3d 3d 62 64 77 69 64 |j==0 || |j==bdwid|
|000032a0| 74 68 2d 31 29 20 6d 61 | 72 6b 6f 6e 28 69 2c 77 |th-1) ma|rkon(i,w|
|000032b0| 61 6c 6c 29 3b 0a 58 20 | 20 20 20 20 20 20 20 65 |all);.X | e|
|000032c0| 6c 73 65 20 6d 61 72 6b | 6f 6e 28 69 2c 62 6f 61 |lse mark|on(i,boa|
|000032d0| 72 64 5b 69 5d 29 3b 0a | 58 20 20 7d 0a 58 20 20 |rd[i]);.|X }.X |
|000032e0| 63 5f 6d 6f 76 65 28 62 | 64 79 2b 62 64 77 69 64 |c_move(b|dy+bdwid|
|000032f0| 74 68 2d 31 2c 62 64 78 | 29 3b 0a 58 20 20 66 6f |th-1,bdx|);.X fo|
|00003300| 72 28 69 3d 32 2c 6e 3d | 62 64 77 69 64 74 68 2a |r(i=2,n=|bdwidth*|
|00003310| 32 3b 20 69 3c 3d 6e 3b | 20 69 2b 2b 29 20 63 5f |2; i<=n;| i++) c_|
|00003320| 61 64 64 63 68 28 77 61 | 6c 6c 29 3b 0a 58 0a 58 |addch(wa|ll);.X.X|
|00003330| 2f 2a 0a 58 20 20 66 6f | 72 28 69 3d 31 2c 6e 3d |/*.X fo|r(i=1,n=|
|00003340| 62 64 77 69 64 74 68 2d | 32 3b 20 69 3c 3d 6e 3b |bdwidth-|2; i<=n;|
|00003350| 20 69 2b 2b 29 20 7b 0a | 58 20 20 20 20 6a 20 3d | i++) {.|X j =|
|00003360| 20 69 20 2a 20 62 64 77 | 69 64 74 68 3b 0a 58 20 | i * bdw|idth;.X |
|00003370| 20 20 20 63 5f 61 64 64 | 63 68 5f 61 74 28 78 5f | c_add|ch_at(x_|
|00003380| 72 6f 77 6d 61 72 6b 28 | 6a 29 2c 20 78 5f 72 6f |rowmark(|j), x_ro|
|00003390| 77 28 6a 29 2c 20 20 20 | 20 62 64 78 2d 31 29 3b |w(j), | bdx-1);|
|000033a0| 0a 58 20 20 20 20 63 5f | 61 64 64 63 68 5f 61 74 |.X c_|addch_at|
|000033b0| 28 78 5f 72 6f 77 6d 61 | 72 6b 28 6a 29 2c 20 78 |(x_rowma|rk(j), x|
|000033c0| 5f 72 6f 77 28 6a 29 2c | 20 20 20 20 62 64 78 2b |_row(j),| bdx+|
|000033d0| 32 2a 62 64 77 69 64 74 | 68 2d 31 29 3b 0a 58 20 |2*bdwidt|h-1);.X |
|000033e0| 20 20 20 63 5f 61 64 64 | 63 68 5f 61 74 28 78 5f | c_add|ch_at(x_|
|000033f0| 63 6f 6c 6d 61 72 6b 28 | 69 29 2c 20 62 64 79 2d |colmark(|i), bdy-|
|00003400| 31 2c 20 20 20 20 20 20 | 20 78 5f 63 6f 6c 28 69 |1, | x_col(i|
|00003410| 29 29 3b 0a 58 20 20 20 | 20 63 5f 61 64 64 63 68 |));.X | c_addch|
|00003420| 5f 61 74 28 78 5f 63 6f | 6c 6d 61 72 6b 28 69 29 |_at(x_co|lmark(i)|
|00003430| 2c 20 62 64 79 2b 62 64 | 77 69 64 74 68 2c 20 78 |, bdy+bd|width, x|
|00003440| 5f 63 6f 6c 28 69 29 29 | 3b 0a 58 20 20 7d 0a 58 |_col(i))|;.X }.X|
|00003450| 2a 2f 0a 58 0a 58 20 20 | 66 6f 72 20 28 69 3d 30 |*/.X.X |for (i=0|
|00003460| 3b 20 69 3c 32 3b 20 69 | 2b 2b 29 20 7b 0a 58 20 |; i<2; i|++) {.X |
|00003470| 20 20 20 77 72 69 74 65 | 5f 73 74 72 5f 61 74 28 | write|_str_at(|
|00003480| 6d 73 67 5f 72 6f 77 2c | 20 6d 73 67 5f 63 6f 6c |msg_row,| msg_col|
|00003490| 5b 69 5d 2c 20 20 20 62 | 61 72 5f 73 74 72 29 20 |[i], b|ar_str) |
|000034a0| 3b 0a 58 20 20 20 20 77 | 72 69 74 65 5f 73 74 72 |;.X w|rite_str|
|000034b0| 5f 61 74 28 6e 61 6d 65 | 5f 72 6f 77 2c 6d 73 67 |_at(name|_row,msg|
|000034c0| 5f 63 6f 6c 5b 69 5d 2c | 20 20 20 70 6c 61 79 65 |_col[i],| playe|
|000034d0| 72 5f 6e 61 6d 65 5b 69 | 5d 29 20 3b 0a 58 20 20 |r_name[i|]) ;.X |
|000034e0| 20 20 77 72 69 74 65 5f | 73 74 72 5f 61 74 28 6d | write_|str_at(m|
|000034f0| 61 72 6b 5f 72 6f 77 2c | 6d 73 67 5f 63 6f 6c 5b |ark_row,|msg_col[|
|00003500| 69 5d 2c 20 20 20 6d 61 | 72 6b 5f 73 74 72 5b 69 |i], ma|rk_str[i|
|00003510| 5d 29 20 3b 0a 58 20 20 | 20 20 77 72 69 74 65 5f |]) ;.X | write_|
|00003520| 73 74 72 5f 61 74 28 30 | 2c 20 20 20 20 20 20 20 |str_at(0|, |
|00003530| 6d 73 67 5f 63 6f 6c 5b | 69 5d 2b 38 2c 20 22 28 |msg_col[|i]+8, "(|
|00003540| 30 30 3a 30 30 29 22 29 | 3b 0a 58 20 20 7d 0a 58 |00:00)")|;.X }.X|
|00003550| 7d 0a 58 0a 58 2f 2f 20 | 2d 2d 2d 2d 2d 2d 2d 2d |}.X.X// |--------|
|00003560| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003570| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003580| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003590| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 0a 58 2f |--------|-----.X/|
|000035a0| 2f 20 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/ ------|--------|
|000035b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000035c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000035d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000035e0| 2d 2d 2d 2d 2d 2d 2d 0a | 58 2f 2f 20 20 20 20 20 |-------.|X// |
|000035f0| 20 20 20 20 20 20 20 20 | 20 49 6e 69 74 69 61 6c | | Initial|
|00003600| 69 7a 65 20 62 6f 61 72 | 64 20 73 74 61 74 75 73 |ize boar|d status|
|00003610| 0a 58 0a 58 73 74 61 74 | 69 63 20 69 6e 74 20 63 |.X.Xstat|ic int c|
|00003620| 75 72 72 65 6e 74 5f 6c | 65 76 65 6c 3b 0a 58 73 |urrent_l|evel;.Xs|
|00003630| 74 61 74 69 63 20 69 6e | 74 20 6d 69 6e 5f 64 65 |tatic in|t min_de|
|00003640| 70 74 68 73 5b 5d 20 3d | 20 7b 30 2c 31 2c 32 2c |pths[] =| {0,1,2,|
|00003650| 33 2c 33 2c 33 7d 3b 0a | 58 73 74 61 74 69 63 20 |3,3,3};.|Xstatic |
|00003660| 69 6e 74 20 6d 61 78 5f | 64 65 70 74 68 73 5b 5d |int max_|depths[]|
|00003670| 20 3d 20 7b 30 2c 32 2c | 34 2c 35 2c 38 2c 39 7d | = {0,2,|4,5,8,9}|
|00003680| 3b 0a 58 0a 58 76 6f 69 | 64 20 69 6e 69 74 5f 70 |;.X.Xvoi|d init_p|
|00003690| 6c 61 79 5f 6f 72 64 65 | 72 28 76 6f 69 64 29 20 |lay_orde|r(void) |
|000036a0| 7b 0a 58 20 20 20 20 69 | 6e 74 20 69 2c 70 3b 0a |{.X i|nt i,p;.|
|000036b0| 58 20 20 20 20 63 68 61 | 72 20 78 3b 0a 58 20 20 |X cha|r x;.X |
|000036c0| 20 20 77 72 69 74 65 5f | 73 74 72 5f 61 74 28 33 | write_|str_at(3|
|000036d0| 2c 31 30 2c 22 5b 31 5d | 20 43 68 61 6c 6c 65 6e |,10,"[1]| Challen|
|000036e0| 67 65 20 6d 6f 64 65 2c | 20 20 20 20 28 43 6f 6d |ge mode,| (Com|
|000036f0| 70 75 74 65 72 20 66 69 | 72 73 74 29 22 29 3b 0a |puter fi|rst)");.|
|00003700| 58 20 20 20 20 77 72 69 | 74 65 5f 73 74 72 5f 61 |X wri|te_str_a|
|00003710| 74 28 35 2c 31 30 2c 22 | 5b 32 5d 20 43 6f 6d 70 |t(5,10,"|[2] Comp|
|00003720| 75 74 65 72 20 76 73 20 | 48 75 6d 61 6e 20 20 28 |uter vs |Human (|
|00003730| 43 6f 6d 70 75 74 65 72 | 20 66 69 72 73 74 29 22 |Computer| first)"|
|00003740| 29 3b 0a 58 20 20 20 20 | 77 72 69 74 65 5f 73 74 |);.X |write_st|
|00003750| 72 5f 61 74 28 37 2c 31 | 30 2c 22 5b 33 5d 20 48 |r_at(7,1|0,"[3] H|
|00003760| 75 6d 61 6e 20 76 73 20 | 43 6f 6d 70 75 74 65 72 |uman vs |Computer|
|00003770| 20 20 28 48 75 6d 61 6e | 20 66 69 72 73 74 29 22 | (Human| first)"|
|00003780| 29 3b 0a 58 20 20 64 6f | 20 7b 0a 58 20 20 20 20 |);.X do| {.X |
|00003790| 63 6c 65 61 72 5f 6c 69 | 6e 65 28 30 29 3b 20 20 |clear_li|ne(0); |
|000037a0| 77 72 69 74 65 5f 73 74 | 72 28 22 50 6c 65 61 73 |write_st|r("Pleas|
|000037b0| 65 20 63 68 6f 6f 73 65 | 20 74 68 65 20 70 6c 61 |e choose| the pla|
|000037c0| 79 20 6f 72 64 65 72 3a | 20 28 31 2e 2e 33 29 20 |y order:| (1..3) |
|000037d0| 22 29 20 3b 0a 58 20 20 | 20 20 63 5f 67 65 74 6b |") ;.X | c_getk|
|000037e0| 65 79 28 78 29 3b 20 20 | 69 20 3d 20 78 20 2d 20 |ey(x); |i = x - |
|000037f0| 27 30 27 3b 0a 58 20 20 | 7d 20 77 68 69 6c 65 20 |'0';.X |} while |
|00003800| 28 69 3c 31 20 7c 7c 20 | 69 20 3e 33 29 3b 0a 58 |(i<1 || |i >3);.X|
|00003810| 20 20 63 5f 61 64 64 63 | 68 28 78 29 3b 0a 58 20 | c_addc|h(x);.X |
|00003820| 20 73 77 69 74 63 68 20 | 28 69 29 20 7b 0a 58 20 | switch |(i) {.X |
|00003830| 20 20 20 20 20 63 61 73 | 65 20 31 3a 0a 58 20 20 | cas|e 1:.X |
|00003840| 20 20 20 20 20 20 20 70 | 6c 61 79 65 72 5f 6e 61 | p|layer_na|
|00003850| 6d 65 5b 30 5d 20 3d 20 | 63 6f 6d 70 75 74 65 72 |me[0] = |computer|
|00003860| 5f 6e 61 6d 65 3b 0a 58 | 20 20 20 20 20 20 20 20 |_name;.X| |
|00003870| 20 70 6c 61 79 65 72 5f | 6e 61 6d 65 5b 31 5d 20 | player_|name[1] |
|00003880| 3d 20 67 65 74 5f 6e 61 | 6d 65 28 29 3b 0a 58 20 |= get_na|me();.X |
|00003890| 20 20 20 20 20 20 20 20 | 63 68 61 6c 6c 65 6e 67 | |challeng|
|000038a0| 69 6e 67 20 3d 20 31 3b | 0a 58 20 20 20 20 20 20 |ing = 1;|.X |
|000038b0| 20 20 20 62 72 65 61 6b | 3b 0a 58 20 20 20 20 20 | break|;.X |
|000038c0| 20 63 61 73 65 20 32 3a | 20 63 61 73 65 20 33 3a | case 2:| case 3:|
|000038d0| 0a 58 20 20 20 20 20 20 | 20 20 20 70 6c 61 79 65 |.X | playe|
|000038e0| 72 5f 6e 61 6d 65 5b 69 | 2d 32 5d 20 3d 20 63 6f |r_name[i|-2] = co|
|000038f0| 6d 70 75 74 65 72 5f 6e | 61 6d 65 3b 0a 58 20 20 |mputer_n|ame;.X |
|00003900| 20 20 20 20 20 20 20 70 | 6c 61 79 65 72 5f 6e 61 | p|layer_na|
|00003910| 6d 65 5b 33 2d 69 5d 20 | 3d 20 67 65 74 5f 6e 61 |me[3-i] |= get_na|
|00003920| 6d 65 28 29 3b 0a 58 20 | 20 20 20 20 20 20 20 20 |me();.X | |
|00003930| 63 68 61 6c 6c 65 6e 67 | 69 6e 67 20 3d 20 30 3b |challeng|ing = 0;|
|00003940| 0a 58 20 20 20 20 20 20 | 20 20 20 62 72 65 61 6b |.X | break|
|00003950| 3b 0a 58 20 20 7d 0a 58 | 0a 58 20 20 64 6f 20 7b |;.X }.X|.X do {|
|00003960| 0a 58 20 20 20 20 63 6c | 65 61 72 5f 6c 69 6e 65 |.X cl|ear_line|
|00003970| 28 31 30 29 3b 0a 58 20 | 20 20 20 69 66 20 28 63 |(10);.X | if (c|
|00003980| 68 61 6c 6c 65 6e 67 69 | 6e 67 29 0a 58 20 20 20 |hallengi|ng).X |
|00003990| 20 20 20 77 72 69 74 65 | 5f 73 74 72 5f 61 74 28 | write|_str_at(|
|000039a0| 31 30 2c 30 2c 22 50 6c | 65 61 73 65 20 63 68 6f |10,0,"Pl|ease cho|
|000039b0| 6f 73 65 20 63 6f 6d 70 | 75 74 65 72 5c 27 73 20 |ose comp|uter\'s |
|000039c0| 73 65 61 72 63 68 20 6c | 65 76 65 6c 3a 20 28 32 |search l|evel: (2|
|000039d0| 2e 2e 35 29 22 29 3b 0a | 58 20 20 20 20 65 6c 73 |..5)");.|X els|
|000039e0| 65 20 0a 58 20 20 20 20 | 20 20 77 72 69 74 65 5f |e .X | write_|
|000039f0| 73 74 72 5f 61 74 28 31 | 30 2c 30 2c 22 50 6c 65 |str_at(1|0,0,"Ple|
|00003a00| 61 73 65 20 63 68 6f 6f | 73 65 20 63 6f 6d 70 75 |ase choo|se compu|
|00003a10| 74 65 72 5c 27 73 20 73 | 65 61 72 63 68 20 6c 65 |ter\'s s|earch le|
|00003a20| 76 65 6c 3a 20 28 31 2e | 2e 35 29 22 29 3b 0a 58 |vel: (1.|.5)");.X|
|00003a30| 20 20 20 20 63 5f 61 64 | 64 63 68 28 27 20 27 29 | c_ad|dch(' ')|
|00003a40| 3b 20 63 5f 67 65 74 6b | 65 79 28 78 29 3b 20 20 |; c_getk|ey(x); |
|00003a50| 63 75 72 72 65 6e 74 5f | 6c 65 76 65 6c 20 3d 20 |current_|level = |
|00003a60| 78 2d 27 30 27 20 3b 0a | 58 20 20 7d 20 77 68 69 |x-'0' ;.|X } whi|
|00003a70| 6c 65 20 28 63 75 72 72 | 65 6e 74 5f 6c 65 76 65 |le (curr|ent_leve|
|00003a80| 6c 20 3c 20 31 20 7c 7c | 20 20 63 75 72 72 65 6e |l < 1 ||| curren|
|00003a90| 74 5f 6c 65 76 65 6c 20 | 3e 20 35 20 7c 7c 20 0a |t_level |> 5 || .|
|00003aa0| 58 20 20 20 20 20 20 20 | 20 20 20 20 28 63 75 72 |X | (cur|
|00003ab0| 72 65 6e 74 5f 6c 65 76 | 65 6c 20 3d 3d 20 31 20 |rent_lev|el == 1 |
|00003ac0| 26 26 20 63 68 61 6c 6c | 65 6e 67 69 6e 67 29 29 |&& chall|enging))|
|00003ad0| 3b 0a 58 20 20 63 5f 61 | 64 64 63 68 28 78 29 3b |;.X c_a|ddch(x);|
|00003ae0| 0a 58 20 20 73 70 72 69 | 6e 74 66 28 63 6f 6d 70 |.X spri|ntf(comp|
|00003af0| 75 74 65 72 5f 6e 61 6d | 65 2c 22 43 6f 6d 70 75 |uter_nam|e,"Compu|
|00003b00| 74 65 72 20 28 4c 25 64 | 29 22 2c 63 75 72 72 65 |ter (L%d|)",curre|
|00003b10| 6e 74 5f 6c 65 76 65 6c | 29 3b 0a 58 20 20 6d 69 |nt_level|);.X mi|
|00003b20| 6e 5f 64 65 70 74 68 20 | 3d 20 6d 69 6e 5f 64 65 |n_depth |= min_de|
|00003b30| 70 74 68 73 5b 63 75 72 | 72 65 6e 74 5f 6c 65 76 |pths[cur|rent_lev|
|00003b40| 65 6c 5d 3b 0a 58 20 20 | 6d 61 78 5f 64 65 70 74 |el];.X |max_dept|
|00003b50| 68 20 3d 20 6d 61 78 5f | 64 65 70 74 68 73 5b 63 |h = max_|depths[c|
|00003b60| 75 72 72 65 6e 74 5f 6c | 65 76 65 6c 5d 3b 0a 58 |urrent_l|evel];.X|
|00003b70| 0a 58 20 20 70 6c 61 79 | 65 72 5f 63 6f 6c 6f 72 |.X play|er_color|
|00003b80| 5b 30 5d 20 3d 20 62 6c | 61 63 6b 20 3b 0a 58 20 |[0] = bl|ack ;.X |
|00003b90| 20 70 6c 61 79 65 72 5f | 63 6f 6c 6f 72 5b 31 5d | player_|color[1]|
|00003ba0| 20 3d 20 77 68 69 74 65 | 20 3b 0a 58 20 20 66 6f | = white| ;.X fo|
|00003bb0| 72 20 28 70 3d 30 3b 20 | 70 3c 32 3b 20 70 2b 2b |r (p=0; |p<2; p++|
|00003bc0| 29 20 7b 0a 58 20 20 20 | 20 66 6f 72 20 28 69 3d |) {.X | for (i=|
|00003bd0| 30 3b 20 69 3c 6d 73 67 | 5f 77 69 64 74 68 3b 20 |0; i<msg|_width; |
|00003be0| 69 2b 2b 29 0a 58 20 20 | 20 20 20 20 6d 61 72 6b |i++).X | mark|
|00003bf0| 5f 73 74 72 5b 70 5d 5b | 69 5d 20 3d 20 70 6c 61 |_str[p][|i] = pla|
|00003c00| 79 65 72 5f 63 6f 6c 6f | 72 5b 70 5d 20 3b 0a 58 |yer_colo|r[p] ;.X|
|00003c10| 20 20 20 20 6d 61 72 6b | 5f 73 74 72 5b 70 5d 5b | mark|_str[p][|
|00003c20| 69 5d 3d 30 3b 0a 58 20 | 20 7d 0a 58 20 20 62 65 |i]=0;.X | }.X be|
|00003c30| 6c 6c 20 3d 20 37 3b 0a | 58 7d 0a 58 2f 2f 20 2d |ll = 7;.|X}.X// -|
|00003c40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003c50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003c60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003c70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003c80| 2d 2d 2d 0a 58 73 74 61 | 74 69 63 20 69 6e 74 20 |---.Xsta|tic int |
|00003c90| 6e 65 77 5f 68 69 67 68 | 5f 73 63 6f 72 65 3d 30 |new_high|_score=0|
|00003ca0| 3b 0a 58 76 6f 69 64 20 | 69 6e 69 74 5f 74 68 65 |;.Xvoid |init_the|
|00003cb0| 5f 62 6f 61 72 64 28 29 | 0a 58 7b 0a 58 20 20 69 |_board()|.X{.X i|
|00003cc0| 6e 74 20 69 3b 0a 58 20 | 20 20 20 69 66 20 28 6e |nt i;.X | if (n|
|00003cd0| 65 77 5f 68 69 67 68 5f | 73 63 6f 72 65 29 20 7b |ew_high_|score) {|
|00003ce0| 0a 58 20 20 20 20 20 20 | 20 20 73 68 6f 77 5f 68 |.X | show_h|
|00003cf0| 69 67 68 5f 73 63 6f 72 | 65 28 31 29 3b 0a 58 20 |igh_scor|e(1);.X |
|00003d00| 20 20 20 20 20 20 20 6e | 65 77 5f 68 69 67 68 5f | n|ew_high_|
|00003d10| 73 63 6f 72 65 20 3d 20 | 30 3b 0a 58 20 20 20 20 |score = |0;.X |
|00003d20| 7d 0a 58 20 20 20 20 73 | 74 65 70 20 3d 20 31 3b |}.X s|tep = 1;|
|00003d30| 20 70 6c 61 79 65 72 20 | 3d 20 30 3b 0a 58 20 20 | player |= 0;.X |
|00003d40| 20 20 6c 61 73 74 5f 6d | 6f 76 65 5f 72 65 63 20 | last_m|ove_rec |
|00003d50| 3d 20 30 3b 0a 58 20 20 | 20 20 74 68 65 5f 6c 61 |= 0;.X | the_la|
|00003d60| 73 74 5f 6d 6f 76 65 20 | 3d 20 63 65 6e 74 65 72 |st_move |= center|
|00003d70| 5f 70 6f 69 6e 74 3b 0a | 58 20 20 20 20 77 61 72 |_point;.|X war|
|00003d80| 6e 69 6e 67 5f 6d 73 67 | 20 3d 20 22 22 3b 0a 58 |ning_msg| = "";.X|
|00003d90| 20 20 20 20 65 73 63 20 | 3d 20 62 61 63 6b 20 3d | esc |= back =|
|00003da0| 20 67 61 6d 65 5f 6f 76 | 65 72 20 3d 20 77 61 72 | game_ov|er = war|
|00003db0| 6e 69 6e 67 5f 6d 73 67 | 5f 6f 6e 20 3d 20 30 3b |ning_msg|_on = 0;|
|00003dc0| 0a 58 20 20 20 20 66 6f | 72 20 28 69 3d 30 3b 20 |.X fo|r (i=0; |
|00003dd0| 69 3c 3d 62 64 6c 65 6e | 67 74 68 3b 20 69 2b 2b |i<=bdlen|gth; i++|
|00003de0| 29 20 62 64 6d 61 72 6b | 5b 69 5d 20 3d 20 30 3b |) bdmark|[i] = 0;|
|00003df0| 0a 58 20 20 20 20 70 6c | 61 79 65 72 5f 74 69 6d |.X pl|ayer_tim|
|00003e00| 65 5b 30 5d 20 3d 20 70 | 6c 61 79 65 72 5f 74 69 |e[0] = p|layer_ti|
|00003e10| 6d 65 5b 31 5d 20 3d 20 | 30 3b 0a 58 20 20 20 20 |me[1] = |0;.X |
|00003e20| 63 5f 63 6c 72 73 63 72 | 28 29 3b 0a 58 20 20 20 |c_clrscr|();.X |
|00003e30| 20 69 6e 69 74 5f 70 6c | 61 79 5f 6f 72 64 65 72 | init_pl|ay_order|
|00003e40| 28 29 3b 0a 58 20 20 20 | 20 72 61 6e 64 6f 6d 69 |();.X | randomi|
|00003e50| 7a 65 28 29 3b 0a 58 20 | 20 20 20 69 6e 69 74 5f |ze();.X | init_|
|00003e60| 64 61 74 61 28 29 3b 20 | 20 20 20 20 20 20 20 2f |data(); | /|
|00003e70| 2f 20 69 6e 20 6d 61 6b | 65 35 2e 43 0a 58 20 20 |/ in mak|e5.C.X |
|00003e80| 20 20 72 65 64 72 61 77 | 5f 62 6f 61 72 64 28 29 | redraw|_board()|
|00003e90| 3b 0a 58 7d 0a 58 2f 2f | 20 2d 2d 2d 2d 2d 2d 2d |;.X}.X//| -------|
|00003ea0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003eb0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003ec0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003ed0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 0a 58 |--------|------.X|
|00003ee0| 2f 2f 20 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |// -----|--------|
|00003ef0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003f00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003f10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003f20| 2d 2d 2d 2d 2d 2d 2d 2d | 0a 58 2f 2f 20 20 20 20 |--------|.X// |
|00003f30| 20 20 6d 61 6b 69 6e 67 | 20 6d 6f 76 65 73 0a 58 | making| moves.X|
|00003f40| 0a 58 73 74 61 74 69 63 | 20 76 6f 69 64 20 63 68 |.Xstatic| void ch|
|00003f50| 65 63 6b 5f 67 61 6d 65 | 5f 6f 76 65 72 28 76 6f |eck_game|_over(vo|
|00003f60| 69 64 29 0a 58 7b 0a 58 | 20 20 77 61 72 6e 69 6e |id).X{.X| warnin|
|00003f70| 67 5f 6d 73 67 20 3d 20 | 67 65 74 5f 77 61 72 6e |g_msg = |get_warn|
|00003f80| 69 6e 67 28 70 6c 61 79 | 65 72 2c 74 68 65 5f 6c |ing(play|er,the_l|
|00003f90| 61 73 74 5f 6d 6f 76 65 | 29 3b 0a 58 20 20 67 61 |ast_move|);.X ga|
|00003fa0| 6d 65 5f 6f 76 65 72 20 | 3d 20 69 73 5f 67 61 6d |me_over |= is_gam|
|00003fb0| 65 5f 6f 76 65 72 28 70 | 6c 61 79 65 72 2c 74 68 |e_over(p|layer,th|
|00003fc0| 65 5f 6c 61 73 74 5f 6d | 6f 76 65 29 3b 0a 58 20 |e_last_m|ove);.X |
|00003fd0| 20 63 6c 65 61 72 5f 6c | 69 6e 65 28 32 33 29 3b | clear_l|ine(23);|
|00003fe0| 0a 58 20 20 69 66 20 28 | 77 61 72 6e 69 6e 67 5f |.X if (|warning_|
|00003ff0| 6d 73 67 5b 30 5d 20 21 | 3d 20 30 29 20 7b 0a 58 |msg[0] !|= 0) {.X|
|00004000| 20 20 20 20 20 20 20 20 | 20 77 72 69 74 65 5f 73 | | write_s|
|00004010| 74 72 5f 61 74 28 32 33 | 2c 32 30 2c 77 61 72 6e |tr_at(23|,20,warn|
|00004020| 69 6e 67 5f 6d 73 67 29 | 3b 0a 58 20 20 20 20 20 |ing_msg)|;.X |
|00004030| 20 20 20 20 63 5f 61 64 | 64 63 68 28 62 65 6c 6c | c_ad|dch(bell|
|00004040| 29 3b 20 20 77 61 72 6e | 69 6e 67 5f 6d 73 67 5f |); warn|ing_msg_|
|00004050| 6f 6e 20 3d 20 31 3b 0a | 58 20 20 7d 20 65 6c 73 |on = 1;.|X } els|
|00004060| 65 20 73 68 6f 77 5f 63 | 6f 6d 6d 61 6e 64 5f 6b |e show_c|ommand_k|
|00004070| 65 79 73 28 29 3b 0a 58 | 20 20 69 66 20 28 67 61 |eys();.X| if (ga|
|00004080| 6d 65 5f 6f 76 65 72 20 | 26 26 20 63 68 61 6c 6c |me_over |&& chall|
|00004090| 65 6e 67 69 6e 67 29 20 | 7b 0a 58 20 20 20 20 20 |enging) |{.X |
|000040a0| 20 20 20 6d 61 69 6c 5f | 72 65 63 6f 72 64 28 63 | mail_|record(c|
|000040b0| 75 72 72 65 6e 74 5f 6c | 65 76 65 6c 2c 6c 61 73 |urrent_l|evel,las|
|000040c0| 74 5f 6d 6f 76 65 5f 72 | 65 63 2c 26 28 6d 6f 76 |t_move_r|ec,&(mov|
|000040d0| 65 5f 72 65 63 5b 31 5d | 29 29 3b 0a 58 20 20 20 |e_rec[1]|));.X |
|000040e0| 20 20 20 20 20 69 66 20 | 28 70 6c 61 79 65 72 3d | if |(player=|
|000040f0| 3d 31 29 20 7b 0a 58 20 | 20 20 20 20 20 20 20 20 |=1) {.X | |
|00004100| 20 20 20 20 20 20 20 6e | 65 77 5f 68 69 67 68 5f | n|ew_high_|
|00004110| 73 63 6f 72 65 3d 31 3b | 0a 58 20 20 20 20 20 20 |score=1;|.X |
|00004120| 20 20 20 20 20 20 20 20 | 20 20 61 64 64 5f 73 63 | | add_sc|
|00004130| 6f 72 65 5f 72 65 63 6f | 72 64 28 63 75 72 72 65 |ore_reco|rd(curre|
|00004140| 6e 74 5f 6c 65 76 65 6c | 2c 73 74 65 70 2c 70 6c |nt_level|,step,pl|
|00004150| 61 79 65 72 5f 74 69 6d | 65 5b 31 5d 29 3b 0a 58 |ayer_tim|e[1]);.X|
|00004160| 20 20 20 20 20 20 20 20 | 7d 0a 58 20 20 7d 0a 58 | |}.X }.X|
|00004170| 7d 0a 58 2f 2f 20 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |}.X// --|--------|
|00004180| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004190| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000041a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000041b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 0a 58 65 78 74 |--------|---.Xext|
|000041c0| 65 72 6e 20 76 6f 69 64 | 20 74 61 6b 65 5f 6f 75 |ern void| take_ou|
|000041d0| 74 28 69 6e 74 29 3b 0a | 58 69 6e 6c 69 6e 65 20 |t(int);.|Xinline |
|000041e0| 76 6f 69 64 20 62 61 63 | 6b 5f 6f 6e 65 5f 6d 6f |void bac|k_one_mo|
|000041f0| 76 65 28 29 20 7b 0a 58 | 20 20 69 6e 74 20 78 20 |ve() {.X| int x |
|00004200| 3d 20 6d 6f 76 65 5f 72 | 65 63 5b 6c 61 73 74 5f |= move_r|ec[last_|
|00004210| 6d 6f 76 65 5f 72 65 63 | 2d 2d 5d 3b 0a 58 20 20 |move_rec|--];.X |
|00004220| 20 20 74 61 6b 65 5f 6f | 75 74 28 78 29 3b 0a 58 | take_o|ut(x);.X|
|00004230| 20 20 20 20 6d 61 72 6b | 6f 6e 28 78 2c 62 6c 61 | mark|on(x,bla|
|00004240| 6e 6b 29 3b 0a 58 7d 0a | 58 2f 2f 20 2d 2d 2d 2d |nk);.X}.|X// ----|
|00004250| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004260| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004270| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004280| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004290| 2d 0a 58 73 74 61 74 69 | 63 20 76 6f 69 64 20 75 |-.Xstati|c void u|
|000042a0| 6e 64 6f 28 29 0a 58 7b | 0a 58 20 20 20 20 69 66 |ndo().X{|.X if|
|000042b0| 20 28 73 74 65 70 20 3e | 20 32 20 7c 7c 20 28 73 | (step >| 2 || (s|
|000042c0| 74 65 70 20 3d 3d 20 32 | 20 26 26 20 70 6c 61 79 |tep == 2| && play|
|000042d0| 65 72 20 3d 3d 20 31 29 | 29 20 7b 0a 58 20 20 20 |er == 1)|) {.X |
|000042e0| 20 20 20 62 61 63 6b 5f | 6f 6e 65 5f 6d 6f 76 65 | back_|one_move|
|000042f0| 28 29 3b 0a 58 20 20 20 | 20 20 20 62 61 63 6b 5f |();.X | back_|
|00004300| 6f 6e 65 5f 6d 6f 76 65 | 28 29 3b 0a 58 20 20 20 |one_move|();.X |
|00004310| 20 20 20 73 74 65 70 2d | 2d 3b 0a 58 20 20 20 20 | step-|-;.X |
|00004320| 20 20 69 66 20 28 70 6c | 61 79 65 72 3d 3d 30 29 | if (pl|ayer==0)|
|00004330| 20 73 74 65 70 2d 2d 3b | 0a 58 20 20 20 20 20 20 | step--;|.X |
|00004340| 70 6c 61 79 65 72 3d 31 | 2d 70 6c 61 79 65 72 3b |player=1|-player;|
|00004350| 0a 58 20 20 20 20 20 20 | 63 68 65 63 6b 5f 67 61 |.X |check_ga|
|00004360| 6d 65 5f 6f 76 65 72 28 | 29 3b 0a 58 20 20 20 20 |me_over(|);.X |
|00004370| 7d 0a 58 7d 0a 58 2f 2f | 20 2d 2d 2d 2d 2d 2d 2d |}.X}.X//| -------|
|00004380| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004390| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000043a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000043b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 0a 58 |--------|------.X|
|000043c0| 2f 2f 20 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |// -----|--------|
|000043d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000043e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000043f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004400| 2d 2d 2d 2d 2d 2d 2d 2d | 0a 58 2f 2f 20 20 20 20 |--------|.X// |
|00004410| 20 20 67 65 74 20 75 73 | 65 72 27 73 20 6d 6f 76 | get us|er's mov|
|00004420| 65 0a 58 0a 58 76 6f 69 | 64 20 61 64 6a 75 73 74 |e.X.Xvoi|d adjust|
|00004430| 28 69 6e 74 20 26 78 29 | 20 7b 20 20 20 20 20 20 |(int &x)| { |
|00004440| 20 20 20 20 20 2f 2f 20 | 20 61 64 6a 75 73 74 20 | // | adjust |
|00004450| 58 20 69 66 20 58 20 69 | 73 20 6f 75 74 20 6f 66 |X if X i|s out of|
|00004460| 20 72 61 6e 67 65 20 0a | 58 20 20 69 6e 74 20 72 | range .|X int r|
|00004470| 2c 63 3b 0a 58 20 20 69 | 66 20 28 28 63 3d 28 78 |,c;.X i|f ((c=(x|
|00004480| 25 62 64 77 69 64 74 68 | 29 29 20 3d 3d 20 30 29 |%bdwidth|)) == 0)|
|00004490| 20 78 2b 2b 3b 0a 58 20 | 20 65 6c 73 65 20 69 66 | x++;.X | else if|
|000044a0| 20 28 63 20 3d 3d 20 62 | 64 77 69 64 74 68 2d 31 | (c == b|dwidth-1|
|000044b0| 29 20 78 2d 2d 3b 0a 58 | 20 20 69 66 20 28 28 72 |) x--;.X| if ((r|
|000044c0| 3d 28 78 2f 62 64 77 69 | 64 74 68 29 29 20 3d 3d |=(x/bdwi|dth)) ==|
|000044d0| 20 30 29 20 78 20 2b 3d | 20 62 64 77 69 64 74 68 | 0) x +=| bdwidth|
|000044e0| 3b 0a 58 20 20 65 6c 73 | 65 20 69 66 20 28 72 20 |;.X els|e if (r |
|000044f0| 3d 3d 20 62 64 77 69 64 | 74 68 2d 31 29 20 78 20 |== bdwid|th-1) x |
|00004500| 2d 3d 20 62 64 77 69 64 | 74 68 3b 0a 58 7d 0a 58 |-= bdwid|th;.X}.X|
|00004510| 2f 2f 20 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |// -----|--------|
|00004520| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004530| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004540| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004550| 2d 2d 2d 2d 2d 2d 2d 0a | 58 73 74 61 74 69 63 20 |-------.|Xstatic |
|00004560| 76 6f 69 64 20 73 68 6f | 77 5f 63 6f 6d 6d 61 6e |void sho|w_comman|
|00004570| 64 5f 6b 65 79 73 28 76 | 6f 69 64 29 20 7b 0a 58 |d_keys(v|oid) {.X|
|00004580| 20 20 20 20 77 72 69 74 | 65 5f 73 74 72 5f 61 74 | writ|e_str_at|
|00004590| 28 32 33 2c 30 2c 63 6f | 6d 6d 61 6e 64 5f 6b 65 |(23,0,co|mmand_ke|
|000045a0| 79 73 5b 63 68 61 6c 6c | 65 6e 67 69 6e 67 5d 29 |ys[chall|enging])|
|000045b0| 3b 20 77 61 72 6e 69 6e | 67 5f 6d 73 67 5f 6f 6e |; warnin|g_msg_on|
|000045c0| 3d 30 3b 0a 58 7d 0a 58 | 2f 2f 20 2d 2d 2d 2d 2d |=0;.X}.X|// -----|
|000045d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000045e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000045f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004600| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0a |--------|-------.|
|00004610| 58 76 6f 69 64 20 77 61 | 69 74 5f 66 69 72 73 74 |Xvoid wa|it_first|
|00004620| 5f 6b 65 79 28 63 68 61 | 72 20 26 6b 29 20 7b 0a |_key(cha|r &k) {.|
|00004630| 58 20 20 69 66 20 28 73 | 74 65 70 20 3d 3d 20 31 |X if (s|tep == 1|
|00004640| 29 20 20 73 68 6f 77 5f | 63 6f 6d 6d 61 6e 64 5f |) show_|command_|
|00004650| 6b 65 79 73 28 29 3b 0a | 58 20 20 6d 6f 76 65 74 |keys();.|X movet|
|00004660| 6f 28 74 68 65 5f 6c 61 | 73 74 5f 6d 6f 76 65 29 |o(the_la|st_move)|
|00004670| 3b 0a 58 20 20 63 5f 67 | 65 74 6b 65 79 28 6b 29 |;.X c_g|etkey(k)|
|00004680| 20 3b 20 6b 20 3d 20 74 | 6f 75 70 70 65 72 28 6b | ; k = t|oupper(k|
|00004690| 29 20 3b 0a 58 20 20 69 | 66 20 28 77 61 72 6e 69 |) ;.X i|f (warni|
|000046a0| 6e 67 5f 6d 73 67 5f 6f | 6e 29 20 73 68 6f 77 5f |ng_msg_o|n) show_|
|000046b0| 63 6f 6d 6d 61 6e 64 5f | 6b 65 79 73 28 29 3b 0a |command_|keys();.|
|000046c0| 58 20 20 6d 6f 76 65 74 | 6f 28 74 68 65 5f 6c 61 |X movet|o(the_la|
|000046d0| 73 74 5f 6d 6f 76 65 29 | 3b 0a 58 7d 0a 58 2f 2f |st_move)|;.X}.X//|
|000046e0| 20 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | -------|--------|
|000046f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004700| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004710| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004720| 2d 2d 2d 2d 2d 0a 58 65 | 78 74 65 72 6e 20 69 6e |-----.Xe|xtern in|
|00004730| 74 20 20 6e 75 6d 5f 6f | 66 5f 73 75 67 67 65 73 |t num_o|f_sugges|
|00004740| 74 69 6f 6e 2c 20 73 75 | 67 67 65 73 74 5f 70 6f |tion, su|ggest_po|
|00004750| 73 69 74 69 6f 6e 5b 5d | 3b 0a 58 76 6f 69 64 20 |sition[]|;.Xvoid |
|00004760| 64 72 61 77 5f 73 75 67 | 67 65 73 74 69 6f 6e 73 |draw_sug|gestions|
|00004770| 28 29 0a 58 7b 20 69 6e | 74 20 69 2c 6e 2c 78 3b |().X{ in|t i,n,x;|
|00004780| 0a 58 0a 58 20 20 20 20 | 66 6f 72 20 28 69 3d 30 |.X.X |for (i=0|
|00004790| 2c 6e 3d 6e 75 6d 5f 6f | 66 5f 73 75 67 67 65 73 |,n=num_o|f_sugges|
|000047a0| 74 69 6f 6e 3b 20 69 3c | 6e 3b 20 69 2b 2b 29 20 |tion; i<|n; i++) |
|000047b0| 7b 0a 58 20 20 20 20 20 | 20 78 3d 73 75 67 67 65 |{.X | x=sugge|
|000047c0| 73 74 5f 70 6f 73 69 74 | 69 6f 6e 5b 69 5d 3b 0a |st_posit|ion[i];.|
|000047d0| 58 20 20 20 20 20 20 62 | 64 6d 61 72 6b 5b 78 5d |X b|dmark[x]|
|000047e0| 3d 31 3b 20 20 6d 61 72 | 6b 6f 6e 28 78 2c 78 6d |=1; mar|kon(x,xm|
|000047f0| 61 72 6b 29 3b 0a 58 20 | 20 20 20 7d 0a 58 7d 0a |ark);.X | }.X}.|
|00004800| 58 2f 2f 20 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |X// ----|--------|
|00004810| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004820| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004830| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004840| 2d 2d 2d 2d 2d 2d 2d 2d | 0a 58 63 6f 6e 73 74 20 |--------|.Xconst |
|00004850| 69 6e 74 20 6d 6f 76 65 | 5f 64 69 72 5b 31 30 5d |int move|_dir[10]|
|00004860| 20 3d 20 7b 30 2c 32 30 | 2c 32 31 2c 32 32 2c 2d | = {0,20|,21,22,-|
|00004870| 31 2c 30 2c 31 2c 2d 32 | 32 2c 2d 32 31 2c 2d 32 |1,0,1,-2|2,-21,-2|
|00004880| 30 7d 3b 0a 58 0a 58 69 | 6e 74 20 70 6c 61 79 65 |0};.X.Xi|nt playe|
|00004890| 72 5f 6d 6f 76 65 28 69 | 6e 74 20 70 29 20 7b 0a |r_move(i|nt p) {.|
|000048a0| 58 20 20 69 6e 74 20 20 | 78 2c 74 3b 0a 58 20 20 |X int |x,t;.X |
|000048b0| 63 68 61 72 20 6b 3b 0a | 58 0a 58 2f 2f 20 20 63 |char k;.|X.X// c|
|000048c0| 5f 61 64 64 63 68 28 62 | 65 6c 6c 29 3b 0a 58 20 |_addch(b|ell);.X |
|000048d0| 20 78 20 3d 20 74 68 65 | 5f 6c 61 73 74 5f 6d 6f | x = the|_last_mo|
|000048e0| 76 65 3b 20 20 0a 58 20 | 20 77 61 69 74 5f 66 69 |ve; .X | wait_fi|
|000048f0| 72 73 74 5f 6b 65 79 28 | 6b 29 20 3b 0a 58 20 20 |rst_key(|k) ;.X |
|00004900| 77 68 69 6c 65 20 28 31 | 29 20 7b 0a 58 20 20 20 |while (1|) {.X |
|00004910| 20 20 20 20 20 73 77 69 | 74 63 68 20 28 6b 29 20 | swi|tch (k) |
|00004920| 7b 0a 58 20 20 20 20 20 | 20 20 20 20 20 63 61 73 |{.X | cas|
|00004930| 65 20 27 49 27 3a 20 6b | 3d 27 38 27 3b 20 62 72 |e 'I': k|='8'; br|
|00004940| 65 61 6b 3b 0a 58 20 20 | 20 20 20 20 20 20 20 20 |eak;.X | |
|00004950| 63 61 73 65 20 27 4a 27 | 3a 20 6b 3d 27 34 27 3b |case 'J'|: k='4';|
|00004960| 20 62 72 65 61 6b 3b 0a | 58 20 20 20 20 20 20 20 | break;.|X |
|00004970| 20 20 20 63 61 73 65 20 | 27 4b 27 3a 20 6b 3d 27 | case |'K': k='|
|00004980| 32 27 3b 20 62 72 65 61 | 6b 3b 0a 58 20 20 20 20 |2'; brea|k;.X |
|00004990| 20 20 20 20 20 20 63 61 | 73 65 20 27 4c 27 3a 20 | ca|se 'L': |
|000049a0| 6b 3d 27 36 27 3b 20 62 | 72 65 61 6b 3b 0a 58 20 |k='6'; b|reak;.X |
|000049b0| 20 20 20 20 20 20 20 7d | 0a 58 20 20 20 20 20 20 | }|.X |
|000049c0| 20 20 73 77 69 74 63 68 | 20 28 6b 29 20 7b 0a 58 | switch| (k) {.X|
|000049d0| 20 20 20 20 20 20 20 20 | 20 20 63 61 73 65 20 27 | | case '|
|000049e0| 52 27 3a 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 |R':.X | |
|000049f0| 20 20 20 20 20 20 63 5f | 72 65 70 61 69 6e 74 28 | c_|repaint(|
|00004a00| 29 3b 20 20 62 72 65 61 | 6b 3b 0a 58 20 20 20 20 |); brea|k;.X |
|00004a10| 20 20 20 20 20 20 63 61 | 73 65 20 27 53 27 3a 0a | ca|se 'S':.|
|00004a20| 58 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |X | |
|00004a30| 20 20 69 66 20 28 62 65 | 6c 6c 3d 3d 37 29 20 20 | if (be|ll==7) |
|00004a40| 62 65 6c 6c 3d 30 3b 20 | 20 65 6c 73 65 20 62 65 |bell=0; | else be|
|00004a50| 6c 6c 3d 37 3b 0a 58 20 | 20 20 20 20 20 20 20 20 |ll=7;.X | |
|00004a60| 20 20 20 20 20 20 20 20 | 62 72 65 61 6b 3b 0a 58 | |break;.X|
|00004a70| 20 20 20 20 20 20 20 20 | 20 20 63 61 73 65 20 27 | | case '|
|00004a80| 31 27 3a 20 63 61 73 65 | 20 27 32 27 3a 20 63 61 |1': case| '2': ca|
|00004a90| 73 65 20 27 33 27 3a 0a | 58 20 20 20 20 20 20 20 |se '3':.|X |
|00004aa0| 20 20 20 63 61 73 65 20 | 27 34 27 3a 20 63 61 73 | case |'4': cas|
|00004ab0| 65 20 27 35 27 3a 20 63 | 61 73 65 20 27 36 27 3a |e '5': c|ase '6':|
|00004ac0| 0a 58 20 20 20 20 20 20 | 20 20 20 20 63 61 73 65 |.X | case|
|00004ad0| 20 27 37 27 3a 20 63 61 | 73 65 20 27 38 27 3a 20 | '7': ca|se '8': |
|00004ae0| 63 61 73 65 20 27 39 27 | 3a 0a 58 20 20 20 20 20 |case '9'|:.X |
|00004af0| 20 20 20 20 20 20 20 20 | 20 20 20 20 74 20 3d 20 | | t = |
|00004b00| 78 20 2b 20 6d 6f 76 65 | 5f 64 69 72 5b 6b 2d 27 |x + move|_dir[k-'|
|00004b10| 30 27 5d 20 3b 0a 58 20 | 20 20 20 20 20 20 20 20 |0'] ;.X | |
|00004b20| 20 20 20 20 20 20 20 20 | 61 64 6a 75 73 74 28 74 | |adjust(t|
|00004b30| 29 20 3b 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 |) ;.X | |
|00004b40| 20 20 20 20 20 20 69 66 | 20 28 20 74 20 21 3d 20 | if| ( t != |
|00004b50| 78 29 20 7b 0a 58 20 20 | 20 20 20 20 20 20 20 20 |x) {.X | |
|00004b60| 20 20 20 20 20 20 20 20 | 20 6d 61 72 6b 78 28 70 | | markx(p|
|00004b70| 2c 78 2c 30 2c 30 29 20 | 3b 0a 58 20 20 20 20 20 |,x,0,0) |;.X |
|00004b80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 78 20 | | x |
|00004b90| 3d 20 74 20 3b 20 20 6d | 61 72 6b 78 28 70 2c 78 |= t ; m|arkx(p,x|
|00004ba0| 2c 31 2c 30 29 20 3b 0a | 58 20 20 20 20 20 20 20 |,1,0) ;.|X |
|00004bb0| 20 20 20 20 20 20 20 20 | 20 20 7d 0a 58 20 20 20 | | }.X |
|00004bc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 62 72 | | br|
|00004bd0| 65 61 6b 3b 0a 58 20 20 | 20 20 20 20 20 20 20 20 |eak;.X | |
|00004be0| 63 61 73 65 20 27 55 27 | 3a 20 20 20 20 20 20 20 |case 'U'|: |
|00004bf0| 20 20 20 20 20 20 2f 2f | 20 55 6e 64 6f 0a 58 20 | //| Undo.X |
|00004c00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004c10| 69 66 20 28 63 68 61 6c | 6c 65 6e 67 69 6e 67 29 |if (chal|lenging)|
|00004c20| 20 62 72 65 61 6b 3b 0a | 58 20 20 20 20 20 20 20 | break;.|X |
|00004c30| 20 20 20 20 20 20 20 20 | 20 20 62 61 63 6b 20 3d | | back =|
|00004c40| 20 62 61 63 6b 20 7c 7c | 20 28 73 74 65 70 20 3e | back ||| (step >|
|00004c50| 20 31 29 20 3b 0a 58 20 | 20 20 20 20 20 20 20 20 | 1) ;.X | |
|00004c60| 20 63 61 73 65 20 27 51 | 27 3a 20 20 20 20 20 20 | case 'Q|': |
|00004c70| 20 20 20 20 20 20 20 2f | 2f 20 20 51 75 69 74 0a | /|/ Quit.|
|00004c80| 58 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |X | |
|00004c90| 20 20 65 73 63 20 3d 20 | 65 73 63 20 7c 7c 20 6b | esc = |esc || k|
|00004ca0| 20 3d 3d 20 27 51 27 3b | 0a 58 20 20 20 20 20 20 | == 'Q';|.X |
|00004cb0| 20 20 20 20 20 20 20 20 | 20 20 20 69 66 20 28 65 | | if (e|
|00004cc0| 73 63 20 7c 7c 20 62 61 | 63 6b 29 20 7b 0a 58 20 |sc || ba|ck) {.X |
|00004cd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004ce0| 20 20 6d 61 72 6b 78 28 | 70 2c 78 2c 30 2c 30 29 | markx(|p,x,0,0)|
|00004cf0| 20 3b 20 20 72 65 74 75 | 72 6e 20 78 3b 0a 58 20 | ; retu|rn x;.X |
|00004d00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004d10| 7d 0a 58 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |}.X | |
|00004d20| 20 20 20 20 62 72 65 61 | 6b 3b 0a 58 20 20 20 20 | brea|k;.X |
|00004d30| 20 20 20 20 20 20 63 61 | 73 65 20 27 48 27 3a 0a | ca|se 'H':.|
|00004d40| 58 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |X | |
|00004d50| 20 20 69 66 20 28 63 68 | 61 6c 6c 65 6e 67 69 6e | if (ch|allengin|
|00004d60| 67 29 20 62 72 65 61 6b | 3b 0a 58 20 20 20 20 20 |g) break|;.X |
|00004d70| 20 20 20 20 20 20 20 20 | 20 20 20 20 63 5f 61 64 | | c_ad|
|00004d80| 64 63 68 28 62 6f 61 72 | 64 5b 78 5d 29 20 3b 0a |dch(boar|d[x]) ;.|
|00004d90| 58 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |X | |
|00004da0| 20 20 78 20 3d 20 63 6f | 6d 70 75 74 65 72 5f 73 | x = co|mputer_s|
|00004db0| 75 67 67 65 73 74 28 70 | 29 20 3b 0a 58 20 20 20 |uggest(p|) ;.X |
|00004dc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 64 72 | | dr|
|00004dd0| 61 77 5f 73 75 67 67 65 | 73 74 69 6f 6e 73 28 29 |aw_sugge|stions()|
|00004de0| 3b 0a 58 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;.X | |
|00004df0| 20 20 20 20 6d 61 72 6b | 78 28 70 2c 78 2c 31 2c | mark|x(p,x,1,|
|00004e00| 30 29 20 3b 0a 58 20 20 | 20 20 20 20 20 20 20 20 |0) ;.X | |
|00004e10| 20 20 20 20 20 20 20 62 | 72 65 61 6b 3b 0a 58 20 | b|reak;.X |
|00004e20| 20 20 20 20 20 20 20 20 | 20 64 65 66 61 75 6c 74 | | default|
|00004e30| 3a 0a 58 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |:.X | |
|00004e40| 20 20 20 69 66 20 28 6b | 20 3d 3d 20 31 30 20 26 | if (k| == 10 &|
|00004e50| 26 20 62 6f 61 72 64 5b | 78 5d 20 3d 3d 20 62 6c |& board[|x] == bl|
|00004e60| 61 6e 6b 29 20 20 72 65 | 74 75 72 6e 20 78 3b 0a |ank) re|turn x;.|
|00004e70| 58 20 20 20 20 20 20 20 | 20 7d 0a 58 20 20 20 20 |X | }.X |
|00004e80| 20 20 20 20 63 5f 67 65 | 74 6b 65 79 28 6b 29 3b | c_ge|tkey(k);|
|00004e90| 20 6b 3d 74 6f 75 70 70 | 65 72 28 6b 29 3b 0a 58 | k=toupp|er(k);.X|
|00004ea0| 20 20 7d 20 0a 58 7d 0a | 58 2f 2f 20 2d 2d 2d 2d | } .X}.|X// ----|
|00004eb0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004ec0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004ed0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004ee0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004ef0| 0a 58 69 6e 74 20 6d 6f | 76 65 5f 6f 66 28 69 6e |.Xint mo|ve_of(in|
|00004f00| 74 20 70 29 20 7b 20 20 | 20 20 20 20 20 20 20 20 |t p) { | |
|00004f10| 20 20 2f 2a 20 20 67 65 | 74 20 6d 6f 76 65 20 6f | /* ge|t move o|
|00004f20| 66 20 70 6c 61 79 65 72 | 20 70 20 2a 2f 0a 58 20 |f player| p */.X |
|00004f30| 20 69 6e 74 20 70 32 2c | 6d 3b 0a 58 0a 58 20 20 | int p2,|m;.X.X |
|00004f40| 63 6c 72 5f 6d 61 72 6b | 28 29 3b 0a 58 0a 58 20 |clr_mark|();.X.X |
|00004f50| 20 70 32 20 3d 20 31 20 | 2d 20 70 20 3b 0a 58 20 | p2 = 1 |- p ;.X |
|00004f60| 20 77 72 69 74 65 5f 73 | 74 72 5f 61 74 28 30 2c | write_s|tr_at(0,|
|00004f70| 6d 73 67 5f 63 6f 6c 5b | 70 5d 2c 22 73 74 65 70 |msg_col[|p],"step|
|00004f80| 3a 22 29 3b 0a 58 20 20 | 63 5f 61 64 64 69 6e 74 |:");.X |c_addint|
|00004f90| 28 73 74 65 70 29 20 3b | 20 20 63 5f 61 64 64 63 |(step) ;| c_addc|
|00004fa0| 68 28 27 20 27 29 3b 20 | 20 20 20 20 20 20 2f 2f |h(' '); | //|
|00004fb0| 20 20 64 69 73 70 6c 61 | 79 20 63 75 72 72 65 6e | displa|y curren|
|00004fc0| 74 20 73 74 65 70 0a 58 | 20 20 63 6c 65 61 6e 5f |t step.X| clean_|
|00004fd0| 73 63 72 65 65 6e 28 30 | 2c 6d 73 67 5f 63 6f 6c |screen(0|,msg_col|
|00004fe0| 5b 70 32 5d 2c 38 29 20 | 3b 0a 58 20 20 77 72 69 |[p2],8) |;.X wri|
|00004ff0| 74 65 5f 73 74 72 5f 61 | 74 28 6d 73 67 5f 72 6f |te_str_a|t(msg_ro|
|00005000| 77 2c 6d 73 67 5f 63 6f | 6c 5b 70 5d 2c 62 61 72 |w,msg_co|l[p],bar|
|00005010| 5f 73 74 72 29 20 3b 0a | 58 20 20 63 6c 65 61 6e |_str) ;.|X clean|
|00005020| 5f 73 63 72 65 65 6e 28 | 6d 61 72 6b 5f 72 6f 77 |_screen(|mark_row|
|00005030| 2c 6d 73 67 5f 63 6f 6c | 5b 70 32 5d 2c 6d 73 67 |,msg_col|[p2],msg|
|00005040| 5f 77 69 64 74 68 29 20 | 3b 0a 58 0a 58 20 20 63 |_width) |;.X.X c|
|00005050| 5f 74 69 6d 65 28 74 69 | 6d 65 31 29 3b 0a 58 20 |_time(ti|me1);.X |
|00005060| 20 69 66 20 28 70 6c 61 | 79 65 72 5f 6e 61 6d 65 | if (pla|yer_name|
|00005070| 5b 70 6c 61 79 65 72 5d | 20 3d 3d 20 63 6f 6d 70 |[player]| == comp|
|00005080| 75 74 65 72 5f 6e 61 6d | 65 29 20 20 7b 0a 58 20 |uter_nam|e) {.X |
|00005090| 20 20 20 20 20 20 20 20 | 6d 6f 76 65 74 6f 28 74 | |moveto(t|
|000050a0| 68 65 5f 6c 61 73 74 5f | 6d 6f 76 65 29 3b 0a 58 |he_last_|move);.X|
|000050b0| 20 20 20 20 20 20 20 20 | 20 6d 20 3d 20 63 6f 6d | | m = com|
|000050c0| 70 75 74 65 72 5f 6d 6f | 76 65 28 70 29 3b 0a 58 |puter_mo|ve(p);.X|
|000050d0| 20 20 7d 20 65 6c 73 65 | 20 6d 20 3d 20 70 6c 61 | } else| m = pla|
|000050e0| 79 65 72 5f 6d 6f 76 65 | 28 70 29 20 3b 0a 58 20 |yer_move|(p) ;.X |
|000050f0| 20 63 5f 74 69 6d 65 28 | 74 69 6d 65 32 29 3b 0a | c_time(|time2);.|
|00005100| 58 20 20 64 69 73 70 6c | 61 79 5f 74 69 6d 65 28 |X displ|ay_time(|
|00005110| 70 6c 61 79 65 72 2c 74 | 69 6d 65 32 2d 74 69 6d |player,t|ime2-tim|
|00005120| 65 31 29 3b 0a 58 0a 58 | 20 20 77 72 69 74 65 5f |e1);.X.X| write_|
|00005130| 73 74 72 5f 61 74 28 6d | 61 72 6b 5f 72 6f 77 2c |str_at(m|ark_row,|
|00005140| 6d 73 67 5f 63 6f 6c 5b | 70 32 5d 2c 6d 61 72 6b |msg_col[|p2],mark|
|00005150| 5f 73 74 72 5b 70 32 5d | 29 20 3b 0a 58 20 20 77 |_str[p2]|) ;.X w|
|00005160| 72 69 74 65 5f 73 74 72 | 5f 61 74 28 6d 73 67 5f |rite_str|_at(msg_|
|00005170| 72 6f 77 2c 6d 73 67 5f | 63 6f 6c 5b 70 5d 2c 62 |row,msg_|col[p],b|
|00005180| 61 72 5f 73 74 72 29 20 | 3b 0a 58 20 20 72 65 74 |ar_str) |;.X ret|
|00005190| 75 72 6e 20 6d 3b 0a 58 | 7d 0a 58 0a 58 2f 2f 20 |urn m;.X|}.X.X// |
|000051a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000051b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000051c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000051d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000051e0| 2d 2d 2d 2d 2d 0a 58 2f | 2f 20 2d 2d 2d 2d 2d 2d |-----.X/|/ ------|
|000051f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005200| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005210| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005220| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0a |--------|-------.|
|00005230| 58 2f 2f 20 20 20 20 20 | 20 53 74 61 72 74 69 6e |X// | Startin|
|00005240| 67 20 61 6e 64 20 45 6e | 64 69 6e 67 20 74 68 65 |g and En|ding the|
|00005250| 20 67 61 6d 65 0a 58 0a | 58 76 6f 69 64 20 65 6e | game.X.|Xvoid en|
|00005260| 64 5f 6f 66 5f 67 61 6d | 65 28 29 20 7b 0a 58 20 |d_of_gam|e() {.X |
|00005270| 20 63 68 61 72 20 73 5b | 38 30 5d 3b 0a 58 20 20 | char s[|80];.X |
|00005280| 63 6c 65 61 72 5f 6c 69 | 6e 65 28 32 33 29 3b 0a |clear_li|ne(23);.|
|00005290| 58 20 20 73 70 72 69 6e | 74 66 28 73 2c 22 2a 2a |X sprin|tf(s,"**|
|000052a0| 2a 20 20 47 41 4d 45 20 | 4f 56 45 52 20 20 2a 2a |* GAME |OVER **|
|000052b0| 2a 20 20 20 20 54 68 65 | 20 77 69 6e 6e 65 72 20 |* The| winner |
|000052c0| 69 73 3a 20 25 73 20 5b | 25 63 5d 22 2c 0a 58 20 |is: %s [|%c]",.X |
|000052d0| 20 20 20 20 20 20 20 70 | 6c 61 79 65 72 5f 6e 61 | p|layer_na|
|000052e0| 6d 65 5b 70 6c 61 79 65 | 72 5d 2c 70 6c 61 79 65 |me[playe|r],playe|
|000052f0| 72 5f 63 6f 6c 6f 72 5b | 70 6c 61 79 65 72 5d 29 |r_color[|player])|
|00005300| 3b 0a 58 20 20 77 72 69 | 74 65 5f 73 74 72 28 73 |;.X wri|te_str(s|
|00005310| 29 3b 0a 58 20 20 77 72 | 69 74 65 5f 73 74 72 5f |);.X wr|ite_str_|
|00005320| 61 74 28 32 33 2c 37 30 | 2c 22 5b 52 45 54 55 52 |at(23,70|,"[RETUR|
|00005330| 4e 5d 22 29 20 3b 0a 58 | 20 20 63 5f 67 65 74 72 |N]") ;.X| c_getr|
|00005340| 65 74 28 29 3b 20 0a 58 | 7d 0a 58 2f 2f 20 2d 2d |et(); .X|}.X// --|
|00005350| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005360| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005370| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005380| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005390| 2d 2d 0a 58 73 74 61 74 | 69 63 20 76 6f 69 64 20 |--.Xstat|ic void |
|000053a0| 73 68 6f 77 5f 68 69 67 | 68 5f 73 63 6f 72 65 28 |show_hig|h_score(|
|000053b0| 69 6e 74 20 70 61 75 73 | 65 29 0a 58 7b 20 46 49 |int paus|e).X{ FI|
|000053c0| 4c 45 20 2a 66 3b 0a 58 | 20 20 69 6e 74 20 69 3d |LE *f;.X| int i=|
|000053d0| 30 3b 0a 58 20 20 63 68 | 61 72 20 63 3b 0a 58 20 |0;.X ch|ar c;.X |
|000053e0| 20 20 20 66 20 3d 20 66 | 6f 70 65 6e 28 53 63 6f | f = f|open(Sco|
|000053f0| 72 65 46 2c 22 72 22 29 | 3b 0a 58 20 20 20 20 63 |reF,"r")|;.X c|
|00005400| 5f 6d 6f 76 65 28 30 2c | 30 29 3b 0a 58 20 20 20 |_move(0,|0);.X |
|00005410| 20 77 68 69 6c 65 20 28 | 28 63 3d 66 67 65 74 63 | while (|(c=fgetc|
|00005420| 28 66 29 29 20 21 3d 20 | 45 4f 46 29 20 7b 0a 58 |(f)) != |EOF) {.X|
|00005430| 20 20 20 20 20 20 20 20 | 63 5f 61 64 64 63 68 28 | |c_addch(|
|00005440| 63 29 3b 20 0a 58 20 20 | 20 20 20 20 20 20 69 66 |c); .X | if|
|00005450| 20 28 63 3d 3d 27 5c 6e | 27 29 20 69 2b 2b 3b 0a | (c=='\n|') i++;.|
|00005460| 58 20 20 20 20 20 20 20 | 20 69 66 20 28 69 3e 32 |X | if (i>2|
|00005470| 30 29 20 62 72 65 61 6b | 3b 0a 58 20 20 20 20 7d |0) break|;.X }|
|00005480| 0a 58 20 20 20 20 66 63 | 6c 6f 73 65 28 66 29 3b |.X fc|lose(f);|
|00005490| 0a 58 20 20 20 20 69 66 | 20 28 70 61 75 73 65 29 |.X if| (pause)|
|000054a0| 20 7b 0a 58 20 20 20 20 | 20 20 77 72 69 74 65 5f | {.X | write_|
|000054b0| 73 74 72 5f 61 74 28 32 | 33 2c 30 2c 22 74 79 70 |str_at(2|3,0,"typ|
|000054c0| 65 20 5b 52 45 54 55 52 | 4e 5d 20 74 6f 20 63 6f |e [RETUR|N] to co|
|000054d0| 6e 74 69 6e 75 65 2e 2e | 2e 22 29 20 3b 20 63 5f |ntinue..|.") ; c_|
|000054e0| 67 65 74 72 65 74 28 29 | 3b 0a 58 20 20 20 20 7d |getret()|;.X }|
|000054f0| 20 65 6c 73 65 20 63 5f | 6d 6f 76 65 28 32 33 2c | else c_|move(23,|
|00005500| 30 29 3b 0a 58 7d 0a 58 | 2f 2f 20 2d 2d 2d 2d 2d |0);.X}.X|// -----|
|00005510| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005520| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005530| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005540| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0a |--------|-------.|
|00005550| 58 76 6f 69 64 20 69 6e | 69 74 5f 77 69 6e 64 6f |Xvoid in|it_windo|
|00005560| 77 28 29 20 7b 0a 58 20 | 20 63 5f 69 6e 69 74 73 |w() {.X | c_inits|
|00005570| 63 72 28 29 3b 0a 58 20 | 20 63 5f 6b 65 79 5f 72 |cr();.X | c_key_r|
|00005580| 61 77 28 29 3b 0a 58 20 | 20 69 66 20 28 28 63 5f |aw();.X | if ((c_|
|00005590| 6c 69 6e 65 73 28 29 20 | 3c 20 32 34 29 20 7c 7c |lines() |< 24) |||
|000055a0| 20 28 63 5f 63 6f 6c 73 | 28 29 20 3c 20 38 30 29 | (c_cols|() < 80)|
|000055b0| 29 20 20 7b 0a 58 20 20 | 20 20 63 5f 63 6c 65 61 |) {.X | c_clea|
|000055c0| 72 28 29 3b 0a 58 20 20 | 20 20 77 72 69 74 65 5f |r();.X | write_|
|000055d0| 73 74 72 5f 61 74 28 30 | 2c 30 2c 22 54 68 69 73 |str_at(0|,0,"This|
|000055e0| 20 70 72 6f 67 72 61 6d | 20 6e 65 65 64 73 20 61 | program| needs a|
|000055f0| 20 73 63 72 65 65 6e 20 | 73 69 7a 65 20 61 74 20 | screen |size at |
|00005600| 6c 65 61 73 74 20 32 34 | 20 62 79 20 38 30 21 22 |least 24| by 80!"|
|00005610| 29 3b 0a 58 20 20 20 20 | 63 5f 6d 6f 76 65 28 31 |);.X |c_move(1|
|00005620| 2c 30 29 3b 20 20 63 5f | 65 6e 64 77 69 6e 28 29 |,0); c_|endwin()|
|00005630| 3b 0a 58 20 20 20 20 65 | 78 69 74 28 30 29 3b 0a |;.X e|xit(0);.|
|00005640| 58 20 20 7d 0a 58 20 20 | 63 5f 63 6c 72 73 63 72 |X }.X |c_clrscr|
|00005650| 28 29 20 3b 20 0a 58 20 | 20 73 68 6f 77 5f 68 69 |() ; .X | show_hi|
|00005660| 67 68 5f 73 63 6f 72 65 | 28 31 29 3b 0a 58 7d 0a |gh_score|(1);.X}.|
|00005670| 58 2f 2f 20 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |X// ----|--------|
|00005680| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005690| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000056a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000056b0| 2d 2d 2d 2d 2d 2d 2d 2d | 0a 58 76 6f 69 64 20 6d |--------|.Xvoid m|
|000056c0| 61 69 6e 28 29 20 7b 0a | 58 20 20 69 6e 74 20 78 |ain() {.|X int x|
|000056d0| 3b 0a 58 20 20 69 6e 69 | 74 5f 77 69 6e 64 6f 77 |;.X ini|t_window|
|000056e0| 28 29 3b 0a 58 20 20 64 | 6f 20 7b 0a 58 20 20 20 |();.X d|o {.X |
|000056f0| 20 69 6e 69 74 5f 74 68 | 65 5f 62 6f 61 72 64 28 | init_th|e_board(|
|00005700| 29 3b 0a 58 20 20 20 20 | 64 6f 20 7b 0a 58 20 20 |);.X |do {.X |
|00005710| 20 20 20 20 78 20 3d 20 | 6d 6f 76 65 5f 6f 66 28 | x = |move_of(|
|00005720| 70 6c 61 79 65 72 29 20 | 3b 0a 58 20 20 20 20 20 |player) |;.X |
|00005730| 20 69 66 20 28 21 65 73 | 63 29 20 7b 0a 58 20 20 | if (!es|c) {.X |
|00005740| 20 20 20 20 20 20 69 66 | 20 28 62 61 63 6b 29 20 | if| (back) |
|00005750| 7b 0a 58 20 20 20 20 20 | 20 20 20 20 20 20 20 75 |{.X | u|
|00005760| 6e 64 6f 28 29 3b 20 20 | 62 61 63 6b 3d 30 3b 0a |ndo(); |back=0;.|
|00005770| 58 20 20 20 20 20 20 20 | 20 7d 20 65 6c 73 65 20 |X | } else |
|00005780| 7b 0a 58 20 20 20 20 20 | 20 20 20 20 20 20 20 6d |{.X | m|
|00005790| 6f 76 65 5f 72 65 63 5b | 2b 2b 6c 61 73 74 5f 6d |ove_rec[|++last_m|
|000057a0| 6f 76 65 5f 72 65 63 5d | 20 3d 20 78 3b 0a 58 20 |ove_rec]| = x;.X |
|000057b0| 20 20 20 20 20 20 20 20 | 20 20 20 6d 61 72 6b 6f | | marko|
|000057c0| 6e 28 78 2c 70 6c 61 79 | 65 72 5f 63 6f 6c 6f 72 |n(x,play|er_color|
|000057d0| 5b 70 6c 61 79 65 72 5d | 29 3b 0a 58 20 20 20 20 |[player]|);.X |
|000057e0| 20 20 20 20 20 20 20 20 | 73 65 74 5f 6f 6e 28 74 | |set_on(t|
|000057f0| 68 65 5f 6c 61 73 74 5f | 6d 6f 76 65 2c 70 6c 61 |he_last_|move,pla|
|00005800| 79 65 72 29 20 3b 0a 58 | 20 20 20 20 20 20 20 20 |yer) ;.X| |
|00005810| 7d 0a 58 20 20 20 20 20 | 20 20 20 63 68 65 63 6b |}.X | check|
|00005820| 5f 67 61 6d 65 5f 6f 76 | 65 72 28 29 3b 0a 58 20 |_game_ov|er();.X |
|00005830| 20 20 20 20 20 20 20 69 | 66 20 28 21 67 61 6d 65 | i|f (!game|
|00005840| 5f 6f 76 65 72 29 20 7b | 0a 58 20 20 20 20 20 20 |_over) {|.X |
|00005850| 20 20 20 20 70 6c 61 79 | 65 72 20 3d 20 31 20 2d | play|er = 1 -|
|00005860| 20 70 6c 61 79 65 72 20 | 3b 20 20 2f 2f 20 20 74 | player |; // t|
|00005870| 75 72 6e 20 74 6f 20 74 | 68 65 20 6e 65 78 74 20 |urn to t|he next |
|00005880| 70 6c 61 79 65 72 0a 58 | 20 20 20 20 20 20 20 20 |player.X| |
|00005890| 20 20 69 66 20 28 70 6c | 61 79 65 72 20 3d 3d 20 | if (pl|ayer == |
|000058a0| 30 29 20 20 73 74 65 70 | 2b 2b 3b 0a 58 20 20 20 |0) step|++;.X |
|000058b0| 20 20 20 20 20 7d 0a 58 | 20 20 20 20 20 20 7d 20 | }.X| } |
|000058c0| 65 6c 73 65 20 7b 0a 58 | 20 20 20 20 20 20 20 20 |else {.X| |
|000058d0| 67 61 6d 65 5f 6f 76 65 | 72 20 3d 20 31 3b 0a 58 |game_ove|r = 1;.X|
|000058e0| 20 20 20 20 20 20 20 20 | 70 6c 61 79 65 72 20 3d | |player =|
|000058f0| 20 31 20 2d 20 70 6c 61 | 79 65 72 3b 0a 58 20 20 | 1 - pla|yer;.X |
|00005900| 20 20 20 20 20 20 69 66 | 20 28 70 6c 61 79 65 72 | if| (player|
|00005910| 20 3d 3d 20 31 29 20 20 | 73 74 65 70 2d 2d 3b 0a | == 1) |step--;.|
|00005920| 58 20 20 20 20 20 20 7d | 20 0a 58 20 20 20 20 7d |X }| .X }|
|00005930| 20 77 68 69 6c 65 20 28 | 21 67 61 6d 65 5f 6f 76 | while (|!game_ov|
|00005940| 65 72 29 3b 0a 58 20 20 | 20 20 65 6e 64 5f 6f 66 |er);.X | end_of|
|00005950| 5f 67 61 6d 65 28 29 20 | 3b 0a 58 20 20 7d 20 77 |_game() |;.X } w|
|00005960| 68 69 6c 65 20 28 79 65 | 73 5f 6e 6f 28 32 32 2c |hile (ye|s_no(22,|
|00005970| 22 57 6f 75 6c 64 20 79 | 6f 75 20 77 61 6e 74 20 |"Would y|ou want |
|00005980| 74 6f 20 70 6c 61 79 20 | 61 67 61 69 6e 20 3f 22 |to play |again ?"|
|00005990| 29 29 3b 0a 58 20 20 63 | 5f 63 6c 72 73 63 72 28 |));.X c|_clrscr(|
|000059a0| 29 3b 20 73 68 6f 77 5f | 68 69 67 68 5f 73 63 6f |); show_|high_sco|
|000059b0| 72 65 28 30 29 3b 0a 58 | 20 20 63 5f 65 6e 64 77 |re(0);.X| c_endw|
|000059c0| 69 6e 28 29 3b 0a 58 7d | 0a 58 2f 2f 20 2d 2d 2d |in();.X}|.X// ---|
|000059d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000059e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000059f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005a00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005a10| 2d 2d 2d 2d 0a 45 4e 44 | 5f 4f 46 5f 46 49 4c 45 |----.END|_OF_FILE|
|00005a20| 0a 69 66 20 74 65 73 74 | 20 31 36 38 34 39 20 2d |.if test| 16849 -|
|00005a30| 6e 65 20 60 77 63 20 2d | 63 20 3c 27 63 6d 61 6b |ne `wc -|c <'cmak|
|00005a40| 65 35 2e 43 27 60 3b 20 | 74 68 65 6e 0a 20 20 20 |e5.C'`; |then. |
|00005a50| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 5c 22 27 63 | echo sh|ar: \"'c|
|00005a60| 6d 61 6b 65 35 2e 43 27 | 5c 22 20 75 6e 70 61 63 |make5.C'|\" unpac|
|00005a70| 6b 65 64 20 77 69 74 68 | 20 77 72 6f 6e 67 20 73 |ked with| wrong s|
|00005a80| 69 7a 65 21 0a 66 69 0a | 23 20 65 6e 64 20 6f 66 |ize!.fi.|# end of|
|00005a90| 20 27 63 6d 61 6b 65 35 | 2e 43 27 0a 66 69 0a 69 | 'cmake5|.C'.fi.i|
|00005aa0| 66 20 74 65 73 74 20 2d | 66 20 27 69 6e 69 74 62 |f test -|f 'initb|
|00005ab0| 64 2e 43 27 20 2d 61 20 | 22 24 7b 31 7d 22 20 21 |d.C' -a |"${1}" !|
|00005ac0| 3d 20 22 2d 63 22 20 3b | 20 74 68 65 6e 20 0a 20 |= "-c" ;| then . |
|00005ad0| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 57 69 6c 6c | echo sh|ar: Will|
|00005ae0| 20 6e 6f 74 20 63 6c 6f | 62 62 65 72 20 65 78 69 | not clo|bber exi|
|00005af0| 73 74 69 6e 67 20 66 69 | 6c 65 20 5c 22 27 69 6e |sting fi|le \"'in|
|00005b00| 69 74 62 64 2e 43 27 5c | 22 0a 65 6c 73 65 0a 65 |itbd.C'\|".else.e|
|00005b10| 63 68 6f 20 73 68 61 72 | 3a 20 45 78 74 72 61 63 |cho shar|: Extrac|
|00005b20| 74 69 6e 67 20 5c 22 27 | 69 6e 69 74 62 64 2e 43 |ting \"'|initbd.C|
|00005b30| 27 5c 22 20 5c 28 36 35 | 37 34 20 63 68 61 72 61 |'\" \(65|74 chara|
|00005b40| 63 74 65 72 73 5c 29 0a | 73 65 64 20 22 73 2f 5e |cters\).|sed "s/^|
|00005b50| 58 2f 2f 22 20 3e 27 69 | 6e 69 74 62 64 2e 43 27 |X//" >'i|nitbd.C'|
|00005b60| 20 3c 3c 27 45 4e 44 5f | 4f 46 5f 46 49 4c 45 27 | <<'END_|OF_FILE'|
|00005b70| 0a 58 2f 2f 20 46 49 4c | 45 3a 20 20 20 20 20 20 |.X// FIL|E: |
|00005b80| 20 20 69 6e 69 74 62 64 | 2e 43 0a 58 0a 58 23 64 | initbd|.C.X.X#d|
|00005b90| 65 66 69 6e 65 20 74 72 | 75 65 20 20 31 0a 58 23 |efine tr|ue 1.X#|
|00005ba0| 64 65 66 69 6e 65 20 66 | 61 6c 73 65 20 30 0a 58 |define f|alse 0.X|
|00005bb0| 0a 58 23 69 6e 63 6c 75 | 64 65 20 22 62 64 63 6f |.X#inclu|de "bdco|
|00005bc0| 6e 73 74 2e 68 22 0a 58 | 0a 58 63 6f 6e 73 74 20 |nst.h".X|.Xconst |
|00005bd0| 69 6e 74 0a 58 20 20 77 | 65 69 67 68 74 35 5b 35 |int.X w|eight5[5|
|00005be0| 5d 20 3d 20 7b 30 2c 31 | 2c 33 2c 37 2c 31 35 7d |] = {0,1|,3,7,15}|
|00005bf0| 20 2c 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | , | |
|00005c00| 20 20 20 2f 2f 20 7b 20 | 20 2d 33 20 20 2d 32 20 | // { | -3 -2 |
|00005c10| 20 2d 31 20 20 7d 0a 58 | 20 20 64 69 72 78 5b 38 | -1 }.X| dirx[8|
|00005c20| 5d 20 3d 20 7b 32 30 2c | 32 31 2c 32 32 2c 2d 31 |] = {20,|21,22,-1|
|00005c30| 2c 31 2c 2d 32 32 2c 2d | 32 31 2c 2d 32 30 7d 3b |,1,-22,-|21,-20};|
|00005c40| 20 20 20 20 20 20 2f 2f | 20 7b 20 20 20 34 20 20 | //| { 4 |
|00005c50| 20 58 20 20 2d 34 20 20 | 7d 0a 58 20 20 20 20 20 | X -4 |}.X |
|00005c60| 20 2f 2f 20 7b 31 2c 2d | 32 32 2c 2d 32 31 2c 2d | // {1,-|22,-21,-|
|00005c70| 32 30 2c 30 2c 32 30 2c | 32 31 2c 32 32 2c 2d 31 |20,0,20,|21,22,-1|
|00005c80| 7d 20 20 20 20 20 20 20 | 20 2f 2f 20 7b 20 20 20 |} | // { |
|00005c90| 31 20 20 20 32 20 20 20 | 33 20 20 7d 0a 58 20 20 |1 2 |3 }.X |
|00005ca0| 20 20 20 20 2f 2f 20 2d | 34 2e 2e 34 20 3d 3d 3e | // -|4..4 ==>|
|00005cb0| 20 30 2e 2e 37 20 20 20 | 20 20 20 20 20 20 20 20 | 0..7 | |
|00005cc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 2f 2f 20 7b | | // {|
|00005cd0| 20 20 20 35 20 20 20 36 | 20 20 20 37 20 20 7d 0a | 5 6| 7 }.|
|00005ce0| 58 20 20 20 20 20 20 2f | 2f 20 31 20 32 20 33 20 |X /|/ 1 2 3 |
|00005cf0| 34 20 3d 3d 3e 20 30 20 | 31 20 32 20 33 20 20 20 |4 ==> 0 |1 2 3 |
|00005d00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2f | | /|
|00005d10| 2f 20 7b 20 20 20 33 20 | 20 20 58 20 20 20 34 20 |/ { 3 | X 4 |
|00005d20| 20 7d 0a 58 20 20 20 20 | 20 20 2f 2f 20 2d 31 20 | }.X | // -1 |
|00005d30| 2d 32 20 2d 33 20 2d 34 | 20 3d 3d 3e 20 37 20 36 |-2 -3 -4| ==> 7 6|
|00005d40| 20 35 20 34 20 20 20 20 | 20 20 20 20 20 20 20 20 | 5 4 | |
|00005d50| 20 20 2f 2f 20 7b 20 20 | 20 30 20 20 20 31 20 20 | // { | 0 1 |
|00005d60| 20 32 20 20 7d 0a 58 0a | 58 23 69 6e 63 6c 75 64 | 2 }.X.|X#includ|
|00005d70| 65 20 22 6c 69 6e 65 5f | 76 61 6c 2e 69 6e 63 22 |e "line_|val.inc"|
|00005d80| 0a 58 2f 2f 20 64 65 66 | 69 6e 65 73 20 22 63 6f |.X// def|ines "co|
|00005d90| 6e 73 74 20 6c 69 6e 65 | 5f 76 61 6c 5f 74 79 70 |nst line|_val_typ|
|00005da0| 65 20 6c 69 6e 65 5f 76 | 61 6c 22 0a 58 0a 58 69 |e line_v|al".X.Xi|
|00005db0| 6e 74 20 77 65 69 67 68 | 74 33 31 5b 33 31 5d 3b |nt weigh|t31[31];|
|00005dc0| 0a 58 2f 2f 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.X//----|--------|
|00005dd0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005de0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005df0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005e00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0a |--------|-------.|
|00005e10| 58 63 6f 6e 73 74 20 70 | 74 5f 6c 65 76 5f 72 61 |Xconst p|t_lev_ra|
|00005e20| 6e 67 65 0a 58 20 20 70 | 6f 69 6e 74 5f 6c 65 76 |nge.X p|oint_lev|
|00005e30| 5f 74 61 62 5b 6d 61 78 | 5f 6c 69 6e 65 5f 6c 65 |_tab[max|_line_le|
|00005e40| 76 2b 31 5d 5b 6d 61 78 | 5f 6c 69 6e 65 5f 6c 65 |v+1][max|_line_le|
|00005e50| 76 2b 31 5d 0a 58 20 20 | 20 20 3d 20 7b 7b 20 30 |v+1].X | = {{ 0|
|00005e60| 2c 20 30 2c 20 30 2c 20 | 30 2c 20 30 2c 20 30 2c |, 0, 0, |0, 0, 0,|
|00005e70| 20 30 2c 20 30 2c 20 30 | 2c 20 30 2c 20 30 2c 20 | 0, 0, 0|, 0, 0, |
|00005e80| 30 2c 20 30 2c 20 30 2c | 20 30 2c 20 30 2c 20 30 |0, 0, 0,| 0, 0, 0|
|00005e90| 2c 20 30 2c 20 30 2c 20 | 30 2c 20 30 7d 2c 0a 58 |, 0, 0, |0, 0},.X|
|00005ea0| 20 20 20 20 20 20 20 7b | 20 30 2c 20 31 2c 20 31 | {| 0, 1, 1|
|00005eb0| 2c 20 31 2c 20 31 2c 20 | 31 2c 20 31 2c 20 31 2c |, 1, 1, |1, 1, 1,|
|00005ec0| 20 31 2c 20 31 2c 20 31 | 2c 20 31 2c 20 31 2c 20 | 1, 1, 1|, 1, 1, |
|00005ed0| 31 2c 20 31 2c 20 31 2c | 20 31 2c 20 31 2c 20 31 |1, 1, 1,| 1, 1, 1|
|00005ee0| 2c 20 31 2c 20 31 7d 2c | 0a 58 20 20 20 20 20 20 |, 1, 1},|.X |
|00005ef0| 20 7b 20 30 2c 20 31 2c | 20 32 2c 20 32 2c 20 32 | { 0, 1,| 2, 2, 2|
|00005f00| 2c 20 32 2c 20 32 2c 20 | 32 2c 20 32 2c 20 33 2c |, 2, 2, |2, 2, 3,|
|00005f10| 20 33 2c 20 33 2c 20 33 | 2c 20 33 2c 20 33 2c 20 | 3, 3, 3|, 3, 3, |
|00005f20| 33 2c 20 33 2c 20 33 2c | 20 33 2c 20 33 2c 20 33 |3, 3, 3,| 3, 3, 3|
|00005f30| 7d 2c 0a 58 20 20 20 20 | 20 20 20 7b 20 30 2c 20 |},.X | { 0, |
|00005f40| 31 2c 20 32 2c 20 32 2c | 20 32 2c 20 32 2c 20 34 |1, 2, 2,| 2, 2, 4|
|00005f50| 2c 20 34 2c 20 34 2c 20 | 36 2c 20 36 2c 20 36 2c |, 4, 4, |6, 6, 6,|
|00005f60| 20 36 2c 20 36 2c 20 36 | 2c 20 36 2c 20 36 2c 20 | 6, 6, 6|, 6, 6, |
|00005f70| 36 2c 20 36 2c 20 36 2c | 20 36 7d 2c 0a 58 20 20 |6, 6, 6,| 6},.X |
|00005f80| 20 20 20 20 20 7b 20 30 | 2c 20 31 2c 20 32 2c 20 | { 0|, 1, 2, |
|00005f90| 32 2c 20 32 2c 20 32 2c | 20 34 2c 20 34 2c 20 34 |2, 2, 2,| 4, 4, 4|
|00005fa0| 2c 20 36 2c 20 36 2c 20 | 36 2c 20 38 2c 20 38 2c |, 6, 6, |6, 8, 8,|
|00005fb0| 20 38 2c 31 30 2c 31 30 | 2c 31 30 2c 31 30 2c 31 | 8,10,10|,10,10,1|
|00005fc0| 30 2c 31 30 7d 2c 0a 58 | 20 20 20 20 20 20 20 7b |0,10},.X| {|
|00005fd0| 20 30 2c 20 31 2c 20 32 | 2c 20 32 2c 20 32 2c 20 | 0, 1, 2|, 2, 2, |
|00005fe0| 32 2c 20 34 2c 20 34 2c | 20 34 2c 20 36 2c 20 36 |2, 4, 4,| 4, 6, 6|
|00005ff0| 2c 20 36 2c 20 38 2c 20 | 38 2c 20 38 2c 31 30 2c |, 6, 8, |8, 8,10,|
|00006000| 31 30 2c 31 30 2c 31 32 | 2c 31 32 2c 31 32 7d 2c |10,10,12|,12,12},|
|00006010| 0a 58 20 20 20 20 20 20 | 20 7b 20 30 2c 20 31 2c |.X | { 0, 1,|
|00006020| 20 32 2c 20 34 2c 20 34 | 2c 20 34 2c 20 35 2c 20 | 2, 4, 4|, 4, 5, |
|00006030| 35 2c 20 35 2c 20 37 2c | 20 37 2c 20 37 2c 20 37 |5, 5, 7,| 7, 7, 7|
|00006040| 2c 20 37 2c 20 37 2c 20 | 37 2c 20 37 2c 20 37 2c |, 7, 7, |7, 7, 7,|
|00006050| 20 37 2c 20 37 2c 20 37 | 7d 2c 0a 58 20 20 20 20 | 7, 7, 7|},.X |
|00006060| 20 20 20 7b 20 30 2c 20 | 31 2c 20 32 2c 20 34 2c | { 0, |1, 2, 4,|
|00006070| 20 34 2c 20 34 2c 20 35 | 2c 20 35 2c 20 35 2c 20 | 4, 4, 5|, 5, 5, |
|00006080| 37 2c 20 37 2c 20 37 2c | 20 39 2c 20 39 2c 20 39 |7, 7, 7,| 9, 9, 9|
|00006090| 2c 31 31 2c 31 31 2c 31 | 31 2c 31 31 2c 31 31 2c |,11,11,1|1,11,11,|
|000060a0| 31 31 7d 2c 0a 58 20 20 | 20 20 20 20 20 7b 20 30 |11},.X | { 0|
|000060b0| 2c 20 31 2c 20 32 2c 20 | 34 2c 20 34 2c 20 34 2c |, 1, 2, |4, 4, 4,|
|000060c0| 20 35 2c 20 35 2c 20 35 | 2c 20 37 2c 20 37 2c 20 | 5, 5, 5|, 7, 7, |
|000060d0| 37 2c 20 39 2c 20 39 2c | 20 39 2c 31 31 2c 31 31 |7, 9, 9,| 9,11,11|
|000060e0| 2c 31 31 2c 31 33 2c 31 | 33 2c 31 33 7d 2c 0a 58 |,11,13,1|3,13},.X|
|000060f0| 20 20 20 20 20 20 20 7b | 20 30 2c 20 31 2c 20 33 | {| 0, 1, 3|
|00006100| 2c 20 36 2c 20 36 2c 20 | 36 2c 20 37 2c 20 37 2c |, 6, 6, |6, 7, 7,|
|00006110| 20 37 2c 31 34 2c 31 34 | 2c 31 34 2c 31 34 2c 31 | 7,14,14|,14,14,1|
|00006120| 34 2c 31 34 2c 31 37 2c | 31 37 2c 31 39 2c 31 39 |4,14,17,|17,19,19|
|00006130| 2c 31 39 2c 31 39 7d 2c | 0a 58 20 20 20 20 20 20 |,19,19},|.X |
|00006140| 20 7b 20 30 2c 20 31 2c | 20 33 2c 20 36 2c 20 36 | { 0, 1,| 3, 6, 6|
|00006150| 2c 20 36 2c 20 37 2c 20 | 37 2c 20 37 2c 31 34 2c |, 6, 7, |7, 7,14,|
|00006160| 31 34 2c 31 34 2c 31 35 | 2c 31 35 2c 31 35 2c 31 |14,14,15|,15,15,1|
|00006170| 37 2c 31 37 2c 31 39 2c | 31 39 2c 31 39 2c 31 39 |7,17,19,|19,19,19|
|00006180| 7d 2c 0a 58 20 20 20 20 | 20 20 20 7b 20 30 2c 20 |},.X | { 0, |
|00006190| 31 2c 20 33 2c 20 36 2c | 20 36 2c 20 36 2c 20 37 |1, 3, 6,| 6, 6, 7|
|000061a0| 2c 20 37 2c 20 37 2c 31 | 34 2c 31 34 2c 31 34 2c |, 7, 7,1|4,14,14,|
|000061b0| 31 35 2c 31 35 2c 31 35 | 2c 31 37 2c 31 37 2c 31 |15,15,15|,17,17,1|
|000061c0| 39 2c 31 39 2c 31 39 2c | 31 39 7d 2c 0a 58 20 20 |9,19,19,|19},.X |
|000061d0| 20 20 20 20 20 7b 20 30 | 2c 20 31 2c 20 33 2c 20 | { 0|, 1, 3, |
|000061e0| 36 2c 20 38 2c 20 38 2c | 20 37 2c 20 39 2c 20 39 |6, 8, 8,| 7, 9, 9|
|000061f0| 2c 31 34 2c 31 35 2c 31 | 35 2c 31 36 2c 31 36 2c |,14,15,1|5,16,16,|
|00006200| 31 36 2c 31 38 2c 31 38 | 2c 31 38 2c 31 38 2c 31 |16,18,18|,18,18,1|
|00006210| 38 2c 31 38 7d 2c 0a 58 | 20 20 20 20 20 20 20 7b |8,18},.X| {|
|00006220| 20 30 2c 20 31 2c 20 33 | 2c 20 36 2c 20 38 2c 20 | 0, 1, 3|, 6, 8, |
|00006230| 38 2c 20 37 2c 20 39 2c | 20 39 2c 31 34 2c 31 35 |8, 7, 9,| 9,14,15|
|00006240| 2c 31 35 2c 31 36 2c 31 | 38 2c 31 38 2c 31 38 2c |,15,16,1|8,18,18,|
|00006250| 31 38 2c 32 30 2c 32 30 | 2c 32 30 2c 32 30 7d 2c |18,20,20|,20,20},|
|00006260| 0a 58 20 20 20 20 20 20 | 20 7b 20 30 2c 20 31 2c |.X | { 0, 1,|
|00006270| 20 33 2c 20 36 2c 20 38 | 2c 20 38 2c 20 37 2c 20 | 3, 6, 8|, 8, 7, |
|00006280| 39 2c 20 39 2c 31 34 2c | 31 35 2c 31 35 2c 31 36 |9, 9,14,|15,15,16|
|00006290| 2c 31 38 2c 31 38 2c 31 | 38 2c 31 38 2c 32 30 2c |,18,18,1|8,18,20,|
|000062a0| 32 30 2c 32 30 2c 32 30 | 7d 2c 0a 58 20 20 20 20 |20,20,20|},.X |
|000062b0| 20 20 20 7b 20 30 2c 20 | 31 2c 20 33 2c 20 36 2c | { 0, |1, 3, 6,|
|000062c0| 31 30 2c 31 30 2c 20 37 | 2c 31 31 2c 31 31 2c 31 |10,10, 7|,11,11,1|
|000062d0| 37 2c 31 37 2c 31 37 2c | 31 38 2c 31 38 2c 31 38 |7,17,17,|18,18,18|
|000062e0| 2c 32 31 2c 32 31 2c 32 | 32 2c 32 34 2c 32 34 2c |,21,21,2|2,24,24,|
|000062f0| 32 34 7d 2c 0a 58 20 20 | 20 20 20 20 20 7b 20 30 |24},.X | { 0|
|00006300| 2c 20 31 2c 20 33 2c 20 | 36 2c 31 30 2c 31 30 2c |, 1, 3, |6,10,10,|
|00006310| 20 37 2c 31 31 2c 31 31 | 2c 31 37 2c 31 37 2c 31 | 7,11,11|,17,17,1|
|00006320| 37 2c 31 38 2c 31 38 2c | 31 38 2c 32 31 2c 32 31 |7,18,18,|18,21,21|
|00006330| 2c 32 32 2c 32 34 2c 32 | 34 2c 32 34 7d 2c 0a 58 |,22,24,2|4,24},.X|
|00006340| 20 20 20 20 20 20 20 7b | 20 30 2c 20 31 2c 20 33 | {| 0, 1, 3|
|00006350| 2c 20 36 2c 31 30 2c 31 | 30 2c 20 37 2c 31 31 2c |, 6,10,1|0, 7,11,|
|00006360| 31 31 2c 31 39 2c 31 39 | 2c 31 39 2c 31 38 2c 32 |11,19,19|,19,18,2|
|00006370| 30 2c 32 30 2c 32 32 2c | 32 32 2c 32 33 2c 32 35 |0,20,22,|22,23,25|
|00006380| 2c 32 36 2c 32 37 7d 2c | 0a 58 20 20 20 20 20 20 |,26,27},|.X |
|00006390| 20 7b 20 30 2c 20 31 2c | 20 33 2c 20 36 2c 31 30 | { 0, 1,| 3, 6,10|
|000063a0| 2c 31 32 2c 20 37 2c 31 | 31 2c 31 33 2c 31 39 2c |,12, 7,1|1,13,19,|
|000063b0| 31 39 2c 31 39 2c 31 38 | 2c 32 30 2c 32 30 2c 32 |19,19,18|,20,20,2|
|000063c0| 34 2c 32 34 2c 32 35 2c | 32 35 2c 32 36 2c 32 37 |4,24,25,|25,26,27|
|000063d0| 7d 2c 0a 58 20 20 20 20 | 20 20 20 7b 20 30 2c 20 |},.X | { 0, |
|000063e0| 31 2c 20 33 2c 20 36 2c | 31 30 2c 31 32 2c 20 37 |1, 3, 6,|10,12, 7|
|000063f0| 2c 31 31 2c 31 33 2c 31 | 39 2c 31 39 2c 31 39 2c |,11,13,1|9,19,19,|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.