0 POKE808,234 1 POKE644,128:POKE56,128:CLR 2 POKE56,56:CLR:TU=1:POKE53281,15:CO=54272:SC=13:CHIP$="%&[157][157]#$":PL=1 3 DIMBO(80),TA(71),PT(71),A(71),PO(80) 4 GOSUB250 5 GOSUB77 6 GOSUB107 7 GOSUB97 8 IFDE=1THENGOSUB122:GOTO16 9 FORY=2TO5:FORX=2TO5 10 READA:PO(Y*9+X)=A:NEXT:NEXT 11 BO(30)=2:BO(31)=1:BO(39)=1:BO(40)=2:BC=2:WC=2 12 POKE646,1:POKE214,9:PRINT:PRINTTAB(10);CHIP$ 13 POKE214,9:PRINT:POKE646,0:PRINTTAB(13);CHIP$ 14 POKE646,0:POKE214,12:PRINT:PRINTTAB(10);CHIP$ 15 POKE214,12:PRINT:POKE646,1:PRINTTAB(13);CHIP$ 16 FL=1:X=4:Y=4:WC$=STR$(WC)+" ":BC$=STR$(BC)+" " 17 IFTU=1THENM$="BLACK'S TURN":GOTO19 18 M$="WHITE'S TURN" 19 POKE214,4:PRINT:PRINTTAB(26);M$:POKE214,10:PRINT:PRINTTAB(31);BC$ 20 IFPL=1THENAL=BC+1:GOTO22 21 AL=WC+1 22 POKE214,16:PRINT:PRINTTAB(31);WC$ 23 POKE214,9:PRINT:PRINTTAB(26)"BLACK'S CHIPS" 24 POKE214,15:PRINT:PRINTTAB(26)"WHITE'S CHIPS" 25 IFCM=1ANDTU=PLTHENGOSUB193:GOTO46 26 POKE53269,1 27 JV=PEEK(56321):FR=JVAND16:JV=15-(JVAND15):S=0 28 IFJV=1ANDY>0THENY=Y-1:GOTO33 29 IFJV=2ANDY<7THENY=Y+1:GOTO33 30 IFJV=4ANDX>0THENX=X-1:GOTO33 31 IFJV=8ANDX<7THENX=X+1:GOTO33 32 GOTO34 33 POKECO+4,17:POKECO+1,25:FORI=1TO20:NEXTI:POKECO+4,16 34 GETA$:IFA$<>"E"THEN39 35 POKE214,20:PRINT:PRINTTAB(26)"ARE YOU SURE";SPC(27);"YOU WANT TO END" 36 GETA$:IFA$="Y"THEN175 37 IFA$<>"N"THEN36 38 POKE214,20:PRINT:PRINTTAB(26)" ";SPC(27);" " 39 POKE53248,32+X*24:POKE53249,58+Y*24 40 SC=SC+1:IFSC=16THENSC=13 41 POKE2040,SC 42 IFFR=16THEN27 43 XY=Y*9+X:IFBO(XY)>0THEN27 44 POKECO+4,33:POKECO+1,10:FORJ=1TO50:NEXTJ 45 POKECO+4,32:FORJ=15TO0STEP-1:POKECO+1,T:NEXT 46 IFFL=0THEN54 47 POKE53269,0:POKE214,Y*3:PRINT 48 POKE646,TU-1:PRINTTAB(X*3+1);CHIP$ 49 POKECO+4,33:POKECO+1,10:FORJ=1TO50:NEXTJ 50 POKECO+4,32:FORJ=15TO0STEP-1:POKECO+1,T:NEXT 51 IFPO(XY)=0THEN54 52 GOSUB151 53 IFCHIPS>0THENGOSUB162:BO(XY)=TU:GOTO66 54 POKE214,20:PRINT:PRINTTAB(26)"ILLEGAL MOVE";SPC(29);"END OF TURN" 55 POKECO+4,33:POKECO+1,5:FORJ=1TO300:NEXTJ:POKECO+4,32:POKECO+1,0 56 FORJ=1TO150:NEXTJ 57 IFFL=0THEN64 58 POKECO+4,33:POKECO+1,10:FORJ=1TO150:NEXTJ 59 POKECO+4,32:FORJ=15TO0STEP-1:POKECO+1,T:NEXT 60 POKE646,15:POKE214,Y*3:PRINT 61 PRINTTAB(3*X+1);CHIP$ 62 POKECO+4,33:POKECO+1,10:FORJ=1TO50:NEXTJ 63 POKECO+4,32:FORJ=15TO0STEP-1:POKECO+1,T:NEXT 64 POKE214,20:PRINT:PRINTTAB(26)" ";SPC(29);" " 65 GOTO71 66 IFTU=1THENBC=BC+CHIPS+1:WC=WC-CHIPS:GOTO68 67 WC=WC+CHIPS+1:BC=BC-CHIPS 68 FORQ=1TO8 69 IFXY+OF(Q)>-1THENPO(XY+OF(Q))=1 70 NEXTQ 71 TU=3-TU 72 IFWC=0ORBC=0ORWC+BC=64THEN175 73 GOSUB76 74 IFXY=0ORXY=7ORXY=63ORXY=70THENGOSUB235 75 GOTO16 76 FORI=0TO71:TA(I)=0:NEXT:RETURN 77 PRINT"[147][144]":PRINTTAB(14)"REFLECTION" 78 PRINTTAB(10)"(W)HITE MOVES FIRST" 79 PRINTTAB(10)"(B)LACK MOVES FIRST" 80 GETA$:IFA$="W"THENTU=2:GOTO82 81 IFA$<>"B"THEN80 82 PRINTTAB(13)"(N)ORMAL BOARD" 83 PRINTTAB(8)"(D)ESIGN YOUR OWN BOARD" 84 GETA$:IFA$="D"THENDE=1:GOTO86 85 IFA$<>"N"THEN84 86 PRINTTAB(14)"(O)NE PLAYER" 87 PRINTTAB(13)"(T)WO PLAYERS" 88 GETA$:IFA$="T"THEN96 89 IFA$<>"O"THEN88 90 CM=1:PRINTTAB(11)"WHAT LEVEL?(1-2)" 91 GETA$:LE=VAL(A$):IFLE<1ORLE>2THEN91 92 PRINTTAB(9)"COMPUTER PLAYS (B)LACK" 93 PRINTTAB(9)"COMPUTER PLAYS (W)HITE" 94 GETA$:IFA$="W"THENPL=2:GOTO96 95 IFA$<>"B"THEN94 96 RETURN 97 A$="[176][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][174]" 98 B$="[221] [221] [221] [221] [221] [221] [221] [221] [221]" 99 C$="[171][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][179]" 100 D$="[173][195][195][177][195][195][177][195][195][177][195][195][177][195][195][177][195][195][177][195][195][177][195][195][189]" 101 PRINT"[147]":PRINTA$ 102 FORI=1TO7 103 PRINTB$:PRINTB$:PRINTC$ 104 NEXTI:PRINTB$:PRINTB$:PRINTD$; 105 RETURN 106 GOTO106 107 PRINTTAB(11)"LOADING IN SPRITES" 108 FORI=832TO1024 109 READA:POKEI,A 110 NEXTI 111 POKE2040,15:POKE53287,4 112 IFPEEK(14616)=63THEN116 113 POKE56334,PEEK(56334)AND254 114 POKE1,PEEK(1)AND251 115 FORI=0TO1023:POKEI+14336,PEEK(I+53248):NEXT 116 POKE1,PEEK(1)OR4 117 POKE56334,PEEK(56334)OR1 118 FORI=14336+280TO14336+311 119 READA:POKEI,A:NEXT 120 POKE53272,(PEEK(53272)AND240)+14 121 RETURN 122 POKE53248,32:POKE53249,58:POKE53269,1 123 PRINT"";TAB(26)"TYPE (B) FOR":PRINTTAB(27)"BLACK CHIP" 124 PRINTTAB(26)"TYPE (W) FOR":PRINTTAB(27)"WHITE CHIP" 125 PRINTTAB(25)"TYPE SPACE FOR":PRINTTAB(29)"NO CHIP" 126 FORY=0TO7:FORX=0TO7 127 POKE53248,32+X*24:POKE53249,58+Y*24 128 GETA$:XY=X+Y*9 129 IFA$="W"THENWC=WC+1:BO(XY)=2:GOTO136 130 IFA$="B"THENBC=BC+1:BO(XY)=1:GOTO136 131 IFA$=" "THENPOKECO+4,17:POKECO+1,25:FORI=1TO20:NEXTI:POKECO+4,16:GOTO146 132 U=U+1:IFU=6THENU=1 133 IFU=1THENSC=SC+1:IFSC=16THENSC=13 134 POKE2040,SC 135 GOTO128 136 POKE646,BO(XY)-1 137 POKECO+4,33:POKECO+1,10:FORJ=1TO50:NEXTJ 138 POKECO+4,32:FORJ=15TO0STEP-1:POKECO+1,T:NEXT 139 POKE214,Y*3:PRINT 140 PRINTTAB(X*3+1);CHIP$ 141 POKECO+4,33:POKECO+1,10:FORJ=1TO50:NEXTJ 142 FORE=1TO8 143 POKECO+4,32:FORJ=15TO0STEP-1:POKECO+1,T:NEXT 144 IFXY+OF(E)>-1THENPO(XY+OF(E))=1 145 NEXTE 146 NEXTX:NEXTY 147 PRINT"";TAB(26)" ":PRINTTAB(27)" " 148 PRINTTAB(26)" ":PRINTTAB(27)" " 149 PRINTTAB(25)" ":PRINTTAB(29)" " 150 RETURN 151 CHIPS=0:FORI=1TO8:L=1:V=0:XX=0 152 V=V+OF(I):IFXY+V>70ORXY+V<0THEN156 153 IFBO(XY+V)=5THEN156 154 IFBO(XY+V)=3-TUTHENXX=1:L=L+1:GOTO152 155 IFXX=1ANDBO(XY+V)=TUTHENGOSUB158 156 NEXT 157 RETURN 158 W=1:V=0 159 V=V+OF(I):TA(XY+V)=TU 160 W=W+1:IFW<=L-1THEN159 161 CHIPS=CHIPS+W-1:RETURN 162 FORI=0TO71 163 IFTA(I)=0ORTA(I)=5THEN173 164 POKE646,TU-1:L=INT(I/9) 165 POKE214,L*3:PRINT 166 POKECO+4,33:POKECO+1,10:FORJ=1TO15:NEXTJ 167 POKECO+4,32:FORJ=15TO0STEP-1:POKECO+1,T:NEXTJ 168 PRINTTAB((I-9*L)*3+1);CHIP$ 169 POKECO+4,33:POKECO+1,10:FORJ=1TO15:NEXTJ 170 POKECO+4,32:FORJ=15TO0STEP-1:POKECO+1,T:NEXTJ 171 BO(I)=TU 172 POKECO+4,32:FORJ=15TO0STEP-1:POKECO+1,T:NEXTJ 173 NEXTI 174 RETURN 175 PRINT"":FORI=3TO24:PRINTSPC(25)" ";:NEXTI 176 IFBC>WCTHENM$="BLACK":HI=BC:LO=WC:GOTO179 177 IFBC"Y"THEN190 192 GOTO2 193 HY=-32000:POKE53269,0 194 HI=-32000:FORXY=0TO71 195 IFBO(XY)>0ORPO(XY)=0THENNEXT:GOTO204 196 GOSUB151:IFCHIPS=0THENNEXT:GOTO204 197 TT=WC+BC:QW=TT/8*CHIPS+PT(XY)*(65-TT)/8 198 IFLE=2ANDCHIPS=A1THENQW=10000 199 IFLE=2ANDREC=0THENGOSUB211:NEXT:GOTO204 200 IFQW>HITHENHI=QW:H1=XY:NEXT:GOTO204 201 IFHI=0THENNEXTXY:GOTO204 202 IFQW/HI>.85ANDQW/HI<1.15THENZZ=INT(RND(1)*2):IFZZ=1THENHI=QW:H1=XY 203 NEXT 204 IFLE=2ANDREC=1THENRETURN 205 IF(HI=-32000ANDLE=1)OR(HY=-32000ANDLE=2)THENFL=0:CHIPS=0 206 XY=H1 207 IFLE=2THENXY=H2 208 GOSUB76 209 Y=INT(XY/9):X=XY-Y*9 210 RETURN 211 A1=AL:FORE=0TO71 212 A(E)=BO(E) 213 IFTA(E)>0THENBO(E)=TA(E):A1=A1+1 214 NEXTE 215 FORQ=1TO8 216 IFXY+OF(Q)>-1THENPO(XY+OF(Q))=PO(XY+OF(Q))+1 217 NEXTQ 218 BO(XY)=TU 219 NW=QW:REC=1:Y1=XY 220 TU=3-TU:GOSUB194:REC=0 221 QY=NW-HI:TU=3-TU 222 IFQY>HYTHENHY=QY:H2=Y1 223 IFHY=0THEN225 224 IFQY/HY>.85ANDQY/HY<1.15THENZZ=INT(RND(1)*2):IFZZ=1THENHY=QY:H2=Y1 225 XY=Y1 226 FORE=0TO70 227 BO(E)=A(E):NEXT 228 GOSUB76 229 FORQ=1TO8 230 IFY1+OF(Q)<0THEN233 231 IFPO(Y1+OF(Q))=2THENPO(Y1+OF(Q))=1:GOTO233 232 PO(Y1+OF(Q))=0 233 NEXTQ 234 RETURN 235 IFXY=7THEN241 236 IFXY=63THEN244 237 IFXY=70THEN247 238 FORI=9TO13:PT(I)=15-I:NEXT 239 FORI=1TO37STEP9:PT(I)=6-INT(I/9):NEXT 240 RETURN 241 FORI=6TO42STEP9:PT(I)=6-INT(I/9):NEXT 242 FORI=16TO12STEP-1:PT(I)=I-10:NEXT 243 RETURN 244 FORI=54TO58:PT(I)=60-I:NEXT 245 FORI=64TO28STEP-9:PT(I)=INT(I/9)-1:NEXT 246 RETURN 247 FORI=61TO58STEP-1:PT(I)=I-55:NEXT 248 FORI=69TO33STEP-9:PT(I)=INT(I/9)-1:NEXT 249 RETURN 250 FORI=1TO8 251 READA 252 OF(I)=A:NEXT 253 FORX=0TO71 254 READA:PT(X)=A 255 NEXTX 256 FORI=8TO71STEP9:BO(I)=5:NEXT 257 FORI=COTOCO+24:POKEI,0:NEXT 258 POKECO+5,130:POKECO+6,66:POKECO+24,15 259 RETURN 260 DATA-10,-9,-8,-1,1,8,9,10 261 DATA16,-8,5,2,2,5,-8,16,0,-8,-12,-2,-2,-2,-2,-12,-8,0 262 DATA5,-2,8,2,2,8,-2,5,0,2,-2,2,1,1,2,-2,2,0 263 DATA2,-2,2,1,1,2,-2,2,0,5,-2,8,2,2,8,-2,5,0 264 DATA-8,-12,-2,-2,-2,-2,-12,-8,0,16,-8,5,2,2,5,-8,16,0 265 DATA0,0,0,0,0,0,0,0 266 DATA0,0,0,0,15,240,0,15 267 DATA240,0,12,48,0,12,48,0 268 DATA12,48,0,12,48,0,15,240 269 DATA0,15,240,0,0,0,0,0 270 DATA0,0,0,0,0,0,0,0 271 DATA0,0,0,0,0,0,0,0 272 DATA0,0,0,0,0,0,0,235 273 DATA0,0,0,0,0,0,63,252 274 DATA0,63,252,0,48,12,0,48 275 DATA12,0,48,12,0,48,12,0 276 DATA48,12,0,48,12,0,48,12 277 DATA0,48,12,0,63,252,0,63 278 DATA252,0,0,0,0,0,0,0 279 DATA0,0,0,0,0,0,0,0 280 DATA0,0,0,0,0,0,0,235 281 DATA255,255,0,255,255,0,192,3 282 DATA0,192,3,0,192,3,0,192 283 DATA3,0,192,3,0,192,3,0 284 DATA192,3,0,192,3,0,192,3 285 DATA0,192,3,0,192,3,0,192 286 DATA3,0,255,255,0,255,255,0 287 DATA0,0,0,0,0,0,0,0 288 DATA0,0,0,0,0,0,0,8 289 DATA63,63,63,63,31,15,7,0,0 290 DATA252,252,252,248,240,224,0,0 291 DATA0,0,7,15,31,63,63,63 292 DATA0,0,224,240,248,252,252,252 293 DATA1,1,1,1,1,0,0,1,1,0,0,1,1,1,1,1