Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_41.ADF » OXO

OXO

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_41.ADF
Filename: OXO
Read OK:
File size: 2B17 bytes
Load address: FFFF0E00
Exec address: FFFF802B
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
   10REM:COMPOX:Three-dimensional Noughts and Crosses
   20REM(C) MICRO USER 1984
   25MODE3
   30@%=4:law=TRUE
   40*KEY10"  O.|MRUN|M"
   50DIM L%(27),test%(4),A%(27)
   60MODE5
   70 ENVELOPE 1,8,1,-1,1,1,1,1,121,-10,-5,-2,120,120:ENVELOPE2,1,0,0,0,0,0,0,126,-1,0,-3,126,126:ENVELOPE3,3,1,1,1,1,1,1,70,-1,-1,-1,69,0:ENVELOPE4,2,0,50,-30,2,1,2,127,-4,-2,-1,126,0
   80VDU28,11,31,19,17,19,1,2,0,0,0,23,231,112,216,216,216,216,216,216,112,23,233,216,216,112,112,112,112,216,216,23,242,0,168,80,168,80,168,80,168  
   90VDU23,230,0,0,0,32,32,0,0,0,23,240,248,248,248,248,248,248,248,248,23,241,248,216,136,168,168,136,216,248,23,243,248,0,136,216,216,136,0,248  
  100*FX15,0
  110 PROCboard:PROCquery:SOUND2,2,150,10:IF Q$="N" OR Q$="n" THEN 140 ELSE 120
  120MODE7:PROCinstruct:SOUND2,2,85,5:IF Q$="Q"OR Q$="q" THEN 140 
  130 MODE5:VDU28,11,31,19,17,19,1,2,0,0,0:PROCsetup:PROCdemo:GOTO 120
  140REPEAT
  150MODE4:PROCwho:PROCask:MODE5   
  160VDU28,11,31,19,17,19,1,2,0,0,0
  170PROCstart
  180REPEAT:IFtns=max THEN line=FALSE:GOTO 320
  190P%=P%*-1:tns=tns+1
  200PROCsay(1,2,CHR$(232+P%))
  210 IFn1$="C" AND P%=-1 THEN PROCbeebgo:GOTO 280  
  220IF n2$="C" AND P%=1 THEN PROCbeebgo:GOTO 280   
  230PRINT:INPUT,G$
  240test%=TRUE:PROCvalid:PRINT
  250 IF test%=FALSE THEN PRINT"Are you sure?":PROCtune3(25):GOTO210
  260PROCcalc:PROClegal(s%):IF ABS(L%(s%))>27 THEN PRINT"Already  taken!":PROCtune1(4,s%):PROCtune3(60):GOTO210   
  270IF law=FALSE THEN PRINT"   Not  allowed":PROCtune1(4,s%):PROCtune2:GOTO 210
  280PROCshow(s%,232+P%):PROCtune1(P%+2,s%):L%(s%)=FNV(s%)*P%
  290IF tns>22 THEN PRINT';tns;"boxes"'"are now"'"taken."'max;"total"'"allowed!"
  300IF game=5 THEN 340
  310PROCtry
  320UNTIL line=TRUE OR tns=max
  330GOTO 360
  340UNTIL tns=max
  350IF game=5 THEN PROCfivend:GOTO 390
  360IF line=TRUE THEN PROCrow:GOTO380
  370IF tns=max THEN PROCdraw:GOTO 390
  380PROChowmany:IF end=FALSE THEN 180
  390PRINT"ANOTHER  GAME ?"
  400UNTIL GET$="N"
  410CLS:CLG:VDU19,0,1,0,0,0
  420GCOL0,3
  430MOVE200,500:VDU5
  440PRINT"Goodbye,Ken.!":VDU 4,26 
  450END
  460DATA1,108,528,2,108,384,3,108,240,4,252,528,5,252,384,6,252,240,7,396,528,8,396,384,9,396,240,10,300,720,11,300,576,12,300,432,13,444,720,14,444,576
  470DATA 15,444,432,16,588,720,17,588,576,18,588,432,19,492,912,20,492,768,21,492,624,22,636,912,23,636,768,24,636,624,25,780,912,26,780,768,27,780,624
  480DEF PROCshow(loc%,sign%)
  490RESTORE 460:REPEAT:READ n%,x%,y%:UNTIL n%=loc%
  500LOCAL t%:t%=3
  510IF loc%>9 THEN t%=1
  520IF loc%>18 THEN t%=2
  530VDU25,4,x%+8;y%-8;18,0,0,5,240,25,4,x%+8;y%-8;18,0,t%,(sign%),4
  540SOUND1,2,loc%*8+16,1
  550ENDPROC
  560DEF PROCsetup
  570PROCtable(444,960,2)
  580PROCtable(252,768,1)
  590PROCtable(60,576,3)
  600PROCchair
  610ENDPROC
  620DEF PROCboard
  630PROCsetup
  640COLOUR3:COLOUR128
  650PROCSAY(1,"  3-D"):PROCSAY(2,"Noughts"):PROCSAY(3,"  and"):PROCSAY(4,"Crosses")   
  660FOR loc%=1 TO 27
  670CH%=231+loc%*2
  680IF CH%>233 THEN CH%=CH%-4:GOTO 680
  690PROCshow(loc%,CH%)
  700NEXT
  710ENDPROC
  720DEFPROCtable(X%,Y%,colour)
  730GCOL 0,colour
  740FOR Z%=X% TO (X%+432)STEP 144
  750MOVE Z%,Y%:DRAW Z%,Y%-432
  760NEXT Z%
  770FOR Z%=Y% TO(Y%-432)STEP-144
  780MOVE X%,Z%:DRAW (X%+432),Z%
  790NEXT Z% 
  800ENDPROC
  810DEFPROCchair
  820GCOL0,1
  830VDU25,4,60;576;25,21,444;960;25,4,492;576;25,21,876;960;25,4,492;144;25,21,876;528;
  840VDU5,18,0,2
  850VDU25,4,484;1000;65,25,4,628;1000;66,25,4,772;1000;67,25,4,892;904;49,25,4,892;760;50,25,4,892;616;51
  860GCOL0,3
  870VDU25,4,100;128;65,25,4,244;128;66,25,4,388;128;67,25,4,0;232;51,25,4,0;376;50,25,4,0;520;49,4
  880ENDPROC
  890DEFPROCSAY(line%,word$)
  900PROCsay(line%,0,word$) 
  910ENDPROC
  920DEFPROCsay(line%,start,word$)
  930LOCAL Y%:Y%=(1000-line%*32)
  940VDU25,4,0;Y%;25,3,432;0;25,83,0;-32;25,3,-432;0;25,83,0;32;
  950VDU 5,18,0,2,25,4,start*64;Y%;
  960PRINT ;word$
  970VDU 4
  980ENDPROC
  990DEFPROCinstruct
 1000PRINT''"  You have just seen a cube of 27 boxes.In case you have never played,the idea  is for one player to try to get three   noughts in a row first,and for the otherthree crosses."  
 1010PRINT'" The row can be horizontal,vertical, or diagonal.The cube is, of course three-  dimensional,and your row can be in any  direction!"   
 1020PRINT'" In this version, 'O' always goes first,and you can choose various skill levels,some positions being illegal as you get more difficult."
 1030PRINT'" To move,give the colour,row number and column letter of the required box."
 1040PRINT'" In the demonstration which follows,    there is a nought on W2C and a cross on G3B!.Press any key for the demonstrationand the key 'Q' when you understand."   
 1050 Q$=GET$
 1060ENDPROC
 1070DEFPROCdemo
 1080 PROCdisplay:PROCshow(8,231):PROCshow(15,233)    
 1090PRINT"There's anought onW2C and across on G3B!"   
 1100PRINT
 1110PRINT"Do not   move on  until youare sure that you understand!"
 1120PROCWAIT(2):PROCSAY(1,"Press"):PROCSAY(2,"any key"):PROCSAY(3,"to con-"):PROCSAY(4,"tinue.")
 1130*FX15,0
 1140REPEAT UNTIL GET
 1150ENDPROC
 1160 DEFPROCstart
 1170PROCsetup
 1180FOR loc%=1TO27:L%(loc%)=loc%:PROCshow(loc%,230):NEXT
 1190FOR loc%=1TO27:A%(loc%)=0:NEXT:FOR loc%=1TO4:test%(loc%)=0:NEXT
 1200CLS:PRINT CHR$(231);" to go    first." 
 1210IF O$="E" OR X$="E" THEN 1230
 1220PROCshow(14,242)
 1230P%=1:tns=0:status=0
 1240IF game<>1 THEN 1280
 1250FOR sq%=10 TO 27
 1260PROCshow(sq%,242)
 1270NEXT
 1280PROCSAY(1,"   "):PROCSAY(4,"to go."):PROCSAY(3,"   "):PROCSAY(2,"   "):PRINT  
 1290PRINT"TYPE YOUR         SQUARE.           colour:  number:  letter:"           
 1300ENDPROC
 1310DEF PROCWAIT(W)
 1320FOR w=1 TO W*1800
 1330NEXTw
 1340ENDPROC
 1350DEF FNV(B%)=511+(B%-1)DIV9*100+(B%-1)MOD9DIV3*10+(B%-1)MOD9MOD3
 1360DATAW,0,G,9,Y,18,1,1,2,2,3,3,A,0,B,3,C,6
 1370DEFPROCcalc
 1380LOCAL A%,B%
 1390s%=0:v%=0
 1400RESTORE 1360
 1410FOR A%=1 TO 3
 1420REPEAT
 1430READ A$,B%
 1440UNTIL A$=MID$(G$,A%,1)
 1450s%=s%+B%
 1460NEXT
 1470ENDPROC
 1480DEFPROCdisplay
 1490FOR loc%=1 TO 27
 1500PROCshow(loc%,230)
 1510NEXT
 1520ENDPROC
 1530DEFPROCvalid
 1540LOCAL X%,Y%,Y$,P$,Q$,R$:g$=""
 1550FOR X%=1 TO 3
 1560Y%=ASC(MID$(G$,X%,1))
 1570IF Y%>90 THEN Y%=Y%-32
 1580g$=g$+CHR$(Y%)
 1590NEXT:G$=g$
 1600FOR X%=1 TO 3  
 1610Y$=MID$(G$,X%,1)
 1620IF X%=1 THEN PROCinvalid("G","W","Y")
 1630IF X%=2 THEN PROCinvalid("1","2","3")
 1640IF X%=3 THEN PROCinvalid("A","B","C")
 1650NEXT
 1660test%=test%(1)ANDtest%(2)ANDtest%(3)
 1670ENDPROC
 1680DEFPROCinvalid(P$,Q$,R$)
 1690IF Y$=P$ OR Y$=Q$ OR Y$=R$  THEN test%(X%)=TRUE ELSE test%(X%)=FALSE
 1700ENDPROC
 1710DEFPROCtry
 1720line=FALSE
 1730LOCAL D%,E%,d%,e%
 1740FOR d%=1 TO 27
 1750IF ABS(L%(d%))<28 THEN 1890
 1760IF d%=s% THEN 1890
 1770D%=L%(s%)-L%(d%)
 1780IF D%>300 THEN 1890
 1790FOR e%=1 TO 27
 1800IF ABS(L%(e%))<28 THEN 1880
 1810IF e%=s% THEN 1880
 1820IF e%=d% THEN 1880   
 1830E%=L%(s%)-L%(e%)
 1840IF E%>300 THEN 1880
 1850IF ABS(E%)=ABS(D%) THEN line=TRUE:p%=e%:r%=d%:q%=s%
 1860IF D%=2*E% THEN line=TRUE:p%=d%:r%=s%:q%=e%
 1870IF D%=E%/2 THEN line=TRUE:p%=e%:r%=s%:q%=d%
 1880NEXT
 1890NEXT
 1900 ENDPROC
 1910DEFPROCrow
 1920RESTORE 460
 1930REPEAT:READ L%,X%,Y%:UNTILp%=L%
 1940RESTORE 460 
 1950REPEAT:READ M%,x%,y%:UNTIL r%=M%
 1960GCOL0,2:MOVE x%+8,y%-8:PLOT21,X%+8,Y%-8:GCOL0,3:MOVE X%+24,Y%-24:PLOT21,x%+24,y%-24
 1970SOUND1,4,p%*8+16,1:PROCWAIT(.5):SOUND1,4,r%*8+16,1:PROCWAIT(.5):SOUND1,4,q%*8+16,1
 1980ENDPROC
 1990DEFPROCwin
 2000 PRINT ''STRING$(18,CHR$(232+P%) +"");'"is the   winner!":PROCtune3(150)
 2010ENDPROC
 2020DEFPROClegal(t%)
 2030law=TRUE
 2040IFgame=1ANDt%>9 THEN law=FALSE:ENDPROC
 2050IF game=1ANDt%<10 THEN ENDPROC
 2060IF P%<0 THEN L$=O$ ELSE L$=X$
 2070IF L$="E" THEN ENDPROC
 2080IF t%=14 THEN law=FALSE
 2090IF L$="M" THEN ENDPROC  
 2100RESTORE 2200
 2110FOR z%=1 TO 8
 2120READ Z%,h%,j%,k%
 2130IF t%<>Z% THEN 2180
 2140law=FALSE
 2150IF ABS(L%(h%))>27 THEN law=TRUE
 2160IF ABS(L%(j%))>27 THEN law=TRUE  
 2170IF ABS(L%(k%))>27 THEN law=TRUE 
 2180NEXT
 2190ENDPROC
 2200DATA1,2,4,10,3,2,6,12,7,4,8,16,9,6,8,18,19,20,22,10,21,20,24,12,25,22,26,16,27,24,26,18
 2210DEF PROCdraw
 2220FOR count=0TO4:PROCtune2:NEXT:PROCtune3(200)
 2230PRINT''STRING$(18,CHR$(232+P%)+""+CHR$(232-P%)+"");'"DRAW!"
 2240ENDPROC
 2250DEF PROCquery
 2260PRINT
 2270PRINT"Do you   want ins-tructions"
 2280PRINT"?":Q$=GET$
 2290ENDPROC
 2300DEFPROCask
 2310VDU19,0,4,0,0,0,19,1,3,0,0,0
 2320PRINT''''"   You have a choice of five different     games,which we shall number 1 to 5."
 2330PRINT''" 1 This is the novice's game,played        on the white squares only,and in        two dimensions."    
 2340PRINT'" 2 In three dimensions;the first player    to get a row wins."  
 2350PRINT'" 3 In three dimensions;the first player    to get TWO rows wins." 
 2360PRINT'" 4 Similar to '3',but the player who       makes the SECOND row has an             extra turn."    
 2370PRINT'" 5 Each player takes turns until the       cube is full.The winner is the one      with most rows."  
 2380PRINT''"   Choose your game!"'''''
 2390INPUT TAB(23,27),game:IF game>5 OR game<1 THEN 2320
 2400SOUND 1,4,game*45,2
 2410IF game=1 THEN H%=9 ELSE H%=27
 2420IF game=1 THEN Q$="E":O$=Q$:X$=Q$:max=9:ENDPROC
 2430CLS:VDU19,1,0,0,0,0,19,0,5,0,0,0
 2440PRINT ''
 2450IF game<3 THEN 2480
 2460PRINT'''"   By the way,unless you are playing       game 5,there is no point in finishing   two(or more) rows in the same go,       as only one of them will count!"         
 2470PROCWAIT(3)
 2480VDU19,0,6,0,0,0
 2490PRINT''"    There are three levels of skill to      choose from:-":PRINT'" E =Easy:All boxes are valid;"     
 2500PRINT'" M =Medium:The centre box,G2B,is out of     bounds;" 
 2510PRINT'" D =Difficult:Not only is the centre box    out of bounds,but so also is each of    the eight corner boxes until one of     the three adjacent  EDGE boxes is       occupied!"   
 2530PRINT'':INPUT"    Skill level for first player",Q$         
 2540O$="E"
 2550IF Q$="M" OR Q$="m" THEN O$="M"
 2560IF Q$="D" OR Q$="d" THEN O$="D"
 2570PRINT':INPUT"    Skill level for second player",Q$     
 2580X$="E" 
 2590IF Q$="M" OR Q$="m" THEN X$="M"
 2600IF Q$="D" OR Q$="d" THEN X$="D" 
 2610IF X$="E" AND O$="E" THEN max=27 ELSE max=26
 2620ENDPROC
 2630DEFPROChowmany
 2640status=status+P%+4:end=FALSE
 2650IF status=30R status=5 THEN 2660 ELSE 2670
 2660IF game <3 THEN PROCwin:end=TRUE:ENDPROC
 2670IF status=8 AND game=4 THEN P%=P%*-1
 2680 IF status=6 OR status>9 THEN PROCwin:end=TRUE:ENDPROC  
 2690ENDPROC
 2700DEFPROCtune1(en%,u%)
 2710SOUND3,en%,u%*8+16,4:SOUND2,en%,u%*8,4
 2720PROCWAIT(0.4)
 2730*FX15,0
 2740ENDPROC  
 2750DEFPROCtune2
 2760SOUND&10,2,6,60
 2770PROCWAIT(0.4)  
 2780*FX15,0         
 2790ENDPROC  
 2800DEFPROCtune3(count)
 2810FOR c%=1 TO count
 2820SOUND &11,RND(4),RND(150)+50,RND(3)
 2830NEXT
 2840PROCWAIT(0.4)       
 2850*FX15,0  
 2860ENDPROC   
 2870DEFPROCwho
 2880VDU19,0,2,0,0,0,19,1,0,0,0,0
 2890PRINT'''''" The game can be played by people or     computers!"  
 2900PRINT'''" Please enter the players' names.":PRINT " (C = COMPUTER!)"  
 2910PRINT'':INPUT" First player",n1$
 2920PRINT'':INPUT" Second  player",n2$
 2930PROCWAIT(1)
 2940ENDPROC       
 2950DATA1,7,2,4,3,7,4,4,5,5,6,4,7,7,8,4,9,7,10,4,11,5,12,4,13,5,14,13,15,5,16,4,17,5,18,4,19,7,20,4,21,7,22,4,23,5,24,4,25,7,26,4,27,7
 2960DEFPROCbeebgo
 2970COLOUR2:PRINT'"Thinking....":VDU17,3,11,11,19,0,4,0,0,0    
 2980FOR G%=1 TO H%:A%(G%)=0
 2990IF ABS (L%(G%))>27 THEN 3360
 3000PROClegal(G%):IF G%=14 AND law=FALSE THEN 3360
 3010IF law=FALSE THEN 3350
 3020PROCshow(G%,242+P%):IF G%MOD 2=0 THEN F%=2 ELSE F%=1
 3030RESTORE 2950
 3040REPEAT:READ squ%,mrk%:UNTIL squ%=G%
 3050A%(G%)=mrk%+400:IF game=1 AND G%=5 THEN A%(5)=418 
 3060FOR d%=F% TO G%-2 STEP 2
 3070IF d%=G% THEN 3140
 3080IF d%<>14 THEN 3100
 3090IF NOT (X$="E" OR O$="E") THEN 3140
 3100e%=(G%+d%)/2
 3110IF e%<>14 THEN 3130
 3120IF NOT(X$="E" OR O$="E")THEN 3140
 3130IF FNV(e%)-FNV(d%)=FNV(G%)-FNV(e%) THEN PROCaward
 3140NEXT
 3150FOR d%=1 TO G%-1
 3160IF d%=G% THEN 3240
 3170IF d%<>14 THEN 3190
 3180IF NOT(X$="E" OR O$="E") THEN 3240
 3190e%=2*G%-d%
 3200IF e%>H% THEN 3240
 3210IF e%<>14 THEN 3230
 3220IF NOT(X$="E" OR O$="E") THEN 3240
 3230IF FNV(G%)-FNV(d%)=FNV(e%)-FNV(G%) THEN PROCaward 
 3240NEXT
 3250FOR d%=G%+1 TO H%
 3260IF d%>=H% THEN 3340
 3270IF d%<>14 THEN 3290
 3280IF NOT(X$="E" OR O$="E") THEN 3340
 3290e%=2*d%-G%
 3300IF e%>H% THEN 3340
 3310IF e%<>14 THEN 3330
 3320IF NOT(X$="E" OR O$="E") THEN 3340
 3330IF FNV(e%)-FNV(d%)=FNV(d%)-FNV(G%) THEN PROCaward 
 3340NEXT
 3350PROCshow(G%,230)
 3360NEXT
 3370VDU19,0,0,0,0,0
 3380start%=2+RND(H%-4):b%=0:s%=0
 3390FOR g%=start% TO H%:PROCbestmove:NEXT
 3400FOR g%=1 TO (start%-1):PROCbestmove:NEXT 
 3410ENDPROC
 3420DEFPROCbestmove:IF A%(g%)>b% THEN s%=g%:b%=A%(g%)
 3430ENDPROC
 3440DEFPROCaward
 3450J%=L%(e%)DIV400*4+L%(d%)DIV400*4+P%
 3460IF ABS(J%)=9 AND game=4 AND status=0 THEN J%=1
 3470RESTORE 3550
 3480IF ABS(J%)=7 AND game=5 THEN A%(G%)=A%(G%)+65:ENDPROC
 3490REPEAT:READ K%,M%:UNTIL K%=ABS(J%)
 3500A%(G%)=A%(G%)+M%
 3510SOUND1,-(J%+3)/2,G%*8,1
 3520*FX15,1
 3530IF ABS(J%)=1 AND ABS(L%(d%))>28 THEN A%(G%)=A%(G%)-50
 3540ENDPROC
 3550DATA 1,10,3,20,5,40,7,400,9,4000
 3560DEFPROCfivend
 3570LOCAL J%,K%,M%
 3580CLS:VDU19,0,1,0,0,0
 3590nt=0:cr=0
 3600PROCprint
 3610FOR J%=1 TO H%-2
 3620FOR K%=J%+1 TO H%-1
 3630M%=2*K%-J%
 3640IF M%>H% THEN 3710
 3650IF L%(K%)-L%(J%)<>L%(M%)-L%(K%) THEN 3710
 3660PROCshow(J%,230):PROCshow(K%,230):PROCshow(M%,230)     
 3670PROCWAIT(.5)      
 3680IF L%(K%)<0 THEN nt=nt+1:PROCprint:PROCshow(K%,231):PROCshow(J%,231):PROCshow(M%,231)    
 3690IF L%(K%)>28 THEN cr=cr+1:PROCprint:PROCshow(J%,233):PROCshow(K%,233):PROCshow(M%,233)   
 3700PROCWAIT(.5)      
 3710NEXT 
 3720NEXT 
 3730VDU19,0,0,0,0,0  
 3740ENDPROC  
 3750DEFPROCprint  
 3760CLS 
 3770PRINT;"Counting" 
 3780VDU31,1,4,231,31,1,6,233   
 3790PRINTTAB(4,4);nt;TAB(4,6);cr 
 3800 ENDPROC

2�:COMPOX:Three-dimensional Noughts and Crosses
�(C) MICRO USER 1984
�3
@%=4:law=�
(*KEY10"  O.|MRUN|M"
2� L%(27),test%(4),A%(27)
<�5
F� � 1,8,1,-1,1,1,1,1,121,-10,-5,-2,120,120:�2,1,0,0,0,0,0,0,126,-1,0,-3,126,126:�3,3,1,1,1,1,1,1,70,-1,-1,-1,69,0:�4,2,0,50,-30,2,1,2,127,-4,-2,-1,126,0
P��28,11,31,19,17,19,1,2,0,0,0,23,231,112,216,216,216,216,216,216,112,23,233,216,216,112,112,112,112,216,216,23,242,0,168,80,168,80,168,80,168  
Z��23,230,0,0,0,32,32,0,0,0,23,240,248,248,248,248,248,248,248,248,23,241,248,216,136,168,168,136,216,248,23,243,248,0,136,216,216,136,0,248  
d*FX15,0
n> �board:�query:�2,2,150,10:� Q$="N" � Q$="n" � �tL@ � �Dx@
x3�7:�instruct:�2,2,85,5:� Q$="Q"� Q$="q" � �tL@ 
�8 �5:�28,11,31,19,17,19,1,2,0,0,0:�setup:�demo:� �Dx@
��
��4:�who:�ask:�5   
� �28,11,31,19,17,19,1,2,0,0,0
�
�start
��:�tns=max � line=�:� �D@A
�P%=P%*-1:tns=tns+1
��say(1,2,�(232+P%))
�( �n1$="C" � P%=-1 � �beebgo:� �TXA  
�(� n2$="C" � P%=1 � �beebgo:� �TXA   
�
�:�,G$
�test%=�:�valid:�
�2 � test%=� � �"Are you sure?":�tune3(25):�dR@
Y�calc:�legal(s%):� �(L%(s%))>27 � �"Already  taken!":�tune1(4,s%):�tune3(60):�dR@   
;� law=� � �"   Not  allowed":�tune1(4,s%):�tune2:� �dR@
5�show(s%,232+P%):�tune1(P%+2,s%):L%(s%)=�V(s%)*P%
"G� tns>22 � �';tns;"boxes"'"are now"'"taken."'max;"total"'"allowed!"
,� game=5 � �DTA
6�try
@� line=� � tns=max
J
� �DhA
T
� tns=max
^� game=5 � �fivend:� �tFA
h� line=� � �row:�D|A
r� tns=max � �draw:� �tFA
|�howmany:� end=� � �tt@
��"ANOTHER  GAME ?"
�� �="N"
��:�:�19,0,1,0,0,0
��0,3
��200,500:�5
��"Goodbye,Ken.!":� 4,26 
��
̕�1,108,528,2,108,384,3,108,240,4,252,528,5,252,384,6,252,240,7,396,528,8,396,384,9,396,240,10,300,720,11,300,576,12,300,432,13,444,720,14,444,576
֔� 15,444,432,16,588,720,17,588,576,18,588,432,19,492,912,20,492,768,21,492,624,22,636,912,23,636,768,24,636,624,25,780,912,26,780,768,27,780,624
�� �show(loc%,sign%)
�!� �dLA:�:� n%,x%,y%:� n%=loc%
�
� t%:t%=3
�� loc%>9 � t%=1
� loc%>18 � t%=2
A�25,4,x%+8;y%-8;18,0,0,5,240,25,4,x%+8;y%-8;18,0,t%,(sign%),4
�1,2,loc%*8+16,1
&�
0� �setup
:�table(444,960,2)
D�table(252,768,1)
N�table(60,576,3)
X
�chair
b�
l� �board
v
�setup
��3:�128
�J�SAY(1,"  3-D"):�SAY(2,"Noughts"):�SAY(3,"  and"):�SAY(4,"Crosses")   
�� loc%=1 � 27
�CH%=231+loc%*2
� � CH%>233 � CH%=CH%-4:� �thB
��show(loc%,CH%)
��
��
���table(X%,Y%,colour)
�� 0,colour
�� Z%=X% � (X%+432)� 144
�� Z%,Y%:� Z%,Y%-432
�� Z%
� Z%=Y% �(Y%-432)�-144
� X%,Z%:� (X%+432),Z%
	� Z% 
 �
*��chair
4�0,1
>U�25,4,60;576;25,21,444;960;25,4,492;576;25,21,876;960;25,4,492;144;25,21,876;528;
H
�5,18,0,2
Rg�25,4,484;1000;65,25,4,628;1000;66,25,4,772;1000;67,25,4,892;904;49,25,4,892;760;50,25,4,892;616;51
\�0,3
f`�25,4,100;128;65,25,4,244;128;66,25,4,388;128;67,25,4,0;232;51,25,4,0;376;50,25,4,0;520;49,4
p�
z��SAY(line%,word$)
��say(line%,0,word$) 
��
���say(line%,start,word$)
�� Y%:Y%=(1000-line%*32)
�=�25,4,0;Y%;25,3,432;0;25,83,0;-32;25,3,-432;0;25,83,0;32;
� � 5,18,0,2,25,4,start*64;Y%;
�� ;word$
�� 4
��
���instruct
��''"  You have just seen a cube of 27 boxes.In case you have never played,the idea  is for one player to try to get three   noughts in a row first,and for the otherthree crosses."  
��'" The row can be horizontal,vertical, or diagonal.The cube is, of course three-  dimensional,and your row can be in any  direction!"   
���'" In this version, 'O' always goes first,and you can choose various skill levels,some positions being illegal as you get more difficult."
R�'" To move,give the colour,row number and column letter of the required box."
��'" In the demonstration which follows,    there is a nought on W2C and a cross on G3B!.Press any key for the demonstrationand the key 'Q' when you understand."   
	 Q$=�
$�
.
��demo
8, �display:�show(8,231):�show(15,233)    
B2�"There's anought onW2C and across on G3B!"   
L�
V?�"Do not   move on  until youare sure that you understand!"
`Q�WAIT(2):�SAY(1,"Press"):�SAY(2,"any key"):�SAY(3,"to con-"):�SAY(4,"tinue.")
j*FX15,0
t	� � �
~�
� ��start
�
�setup
�/� loc%=1�27:L%(loc%)=loc%:�show(loc%,230):�
�7� loc%=1�27:A%(loc%)=0:�:� loc%=1�4:test%(loc%)=0:�
�"�:� �(231);" to go    first." 
�� O$="E" � X$="E" � �dND
��show(14,242)
�P%=1:tns=0:status=0
�� game<>1 � �T@E
�� sq%=10 � 27
��show(sq%,242)
��
B�SAY(1,"   "):�SAY(4,"to go."):�SAY(3,"   "):�SAY(2,"   "):�  

O�"TYPE YOUR         SQUARE.           colour:  number:  letter:"           
�
� �WAIT(W)
(� w=1 � W*1800
2�w
<�
F6� �V(B%)=511+(B%-1)�9*100+(B%-1)�9�3*10+(B%-1)�9�3
P)�W,0,G,9,Y,18,1,1,2,2,3,3,A,0,B,3,C,6
Z
��calc
d� A%,B%
n
s%=0:v%=0
x
� �DPE
�� A%=1 � 3
��
�� A$,B%
�� A$=�G$,A%,1)
�s%=s%+B%
��
��
�
��display
�� loc%=1 � 27
��show(loc%,230)
��
��
���valid
� X%,Y%,Y$,P$,Q$,R$:g$=""
� X%=1 � 3
Y%=�(�G$,X%,1))
"� Y%>90 � Y%=Y%-32
,g$=g$+�(Y%)
6�:G$=g$
@� X%=1 � 3  
JY$=�G$,X%,1)
T"� X%=1 � �invalid("G","W","Y")
^"� X%=2 � �invalid("1","2","3")
h"� X%=3 � �invalid("A","B","C")
r�
|$test%=test%(1)�test%(2)�test%(3)
��
���invalid(P$,Q$,R$)
�8� Y$=P$ � Y$=Q$ � Y$=R$  � test%(X%)=� � test%(X%)=�
��
�	��try
�
line=�
�� D%,E%,d%,e%
�� d%=1 � 27
�� �(L%(d%))<28 � �DbG
�� d%=s% � �DbG
�D%=L%(s%)-L%(d%)
�� D%>300 � �DbG
�� e%=1 � 27
� �(L%(e%))<28 � �DXG
� e%=s% � �DXG
� e%=d% � �DXG   
&E%=L%(s%)-L%(e%)
0� E%>300 � �DXG
:,� �(E%)=�(D%) � line=�:p%=e%:r%=d%:q%=s%
D(� D%=2*E% � line=�:p%=d%:r%=s%:q%=e%
N(� D%=E%/2 � line=�:p%=e%:r%=s%:q%=d%
X�
b�
l �
v	��row
�
� �dLA
��:� L%,X%,Y%:�p%=L%
�� �dLA 
��:� M%,x%,y%:� r%=M%
�E�0,2:� x%+8,y%-8:�21,X%+8,Y%-8:�0,3:� X%+24,Y%-24:�21,x%+24,y%-24
�D�1,4,p%*8+16,1:�WAIT(.5):�1,4,r%*8+16,1:�WAIT(.5):�1,4,q%*8+16,1
��
�	��win
�; � ''�18,�(232+P%) +"");'"is the   winner!":�tune3(150)
��
���legal(t%)
�	law=�
��game=1�t%>9 � law=�:�
� game=1�t%<10 � �
� P%<0 � L$=O$ � L$=X$
� L$="E" � �
 � t%=14 � law=�
*� L$="M" � �  
4
� �tXH
>� z%=1 � 8
H� Z%,h%,j%,k%
R� t%<>Z% � �tDH
\	law=�
f� �(L%(h%))>27 � law=�
p� �(L%(j%))>27 � law=�  
z� �(L%(k%))>27 � law=� 
��
��
�X�1,2,4,10,3,2,6,12,7,4,8,16,9,6,8,18,19,20,22,10,21,20,24,12,25,22,26,16,27,24,26,18
�� �draw
�$� count=0�4:�tune2:�:�tune3(200)
�.�''�18,�(232+P%)+""+�(232-P%)+"");'"DRAW!"
��
�� �query
��
�"�"Do you   want ins-tructions"
�
�"?":Q$=�
��
�	��ask
	�19,0,4,0,0,0,19,1,3,0,0,0
	Y�''''"   You have a choice of five different     games,which we shall number 1 to 5."
	o�''" 1 This is the novice's game,played        on the white squares only,and in        two dimensions."    
	$G�'" 2 In three dimensions;the first player    to get a row wins."  
	.I�'" 3 In three dimensions;the first player    to get TWO rows wins." 
	8j�'" 4 Similar to '3',but the player who       makes the SECOND row has an             extra turn."    
	Bl�'" 5 Each player takes turns until the       cube is full.The winner is the one      with most rows."  
	L"�''"   Choose your game!"'''''
	V+� �23,27),game:� game>5 � game<1 � �TPI
	`� 1,4,game*45,2
	j� game=1 � H%=9 � H%=27
	t)� game=1 � Q$="E":O$=Q$:X$=Q$:max=9:�
	~ �:�19,1,0,0,0,0,19,0,5,0,0,0
	�� ''
	�� game<3 � �tpI
	���'''"   By the way,unless you are playing       game 5,there is no point in finishing   two(or more) rows in the same go,       as only one of them will count!"         
	��WAIT(3)
	��19,0,6,0,0,0
	�i�''"    There are three levels of skill to      choose from:-":�'" E =Easy:All boxes are valid;"     
	�<�'" M =Medium:The centre box,G2B,is out of     bounds;" 
	θ�'" D =Difficult:Not only is the centre box    out of bounds,but so also is each of    the eight corner boxes until one of     the three adjacent  EDGE boxes is       occupied!"   
	�7�'':�"    Skill level for first player",Q$         
	�
O$="E"
	�� Q$="M" � Q$="m" � O$="M"
� Q$="D" � Q$="d" � O$="D"

3�':�"    Skill level for second player",Q$     
X$="E" 
� Q$="M" � Q$="m" � X$="M"
(� Q$="D" � Q$="d" � X$="D" 
2'� X$="E" � O$="E" � max=27 � max=26
<�
F
��howmany
Pstatus=status+P%+4:end=�
Z'� status=30R status=5 � �DdJ � �DnJ
d� game <3 � �win:end=�:�
n"� status=8 � game=4 � P%=P%*-1
x+ � status=6 � status>9 � �win:end=�:�  
��
���tune1(en%,u%)
�"�3,en%,u%*8+16,4:�2,en%,u%*8,4
��WAIT(0.4)
�*FX15,0
��  
���tune2
��&10,2,6,60
��WAIT(0.4)  
�*FX15,0         
��  
���tune3(count)
�� c%=1 � count
� &11,�(4),�(150)+50,�(3)
�
�WAIT(0.4)       
"
*FX15,0  
,�   
6	��who
@�19,0,2,0,0,0,19,1,0,0,0,0
JA�'''''" The game can be played by people or     computers!"  
TB�'''" Please enter the players' names.":� " (C = COMPUTER!)"  
^�'':�" First player",n1$
h�'':�" Second  player",n2$
r�WAIT(1)
|�       
���1,7,2,4,3,7,4,4,5,5,6,4,7,7,8,4,9,7,10,4,11,5,12,4,13,5,14,13,15,5,16,4,17,5,18,4,19,7,20,4,21,7,22,4,23,5,24,4,25,7,26,4,27,7
���beebgo
�4�2:�'"Thinking....":�17,3,11,11,19,0,4,0,0,0    
�� G%=1 � H%:A%(G%)=0
�� � (L%(G%))>27 � �T`M
�%�legal(G%):� G%=14 � law=� � �T`M
�� law=� � �TVM
�,�show(G%,242+P%):� G%� 2=0 � F%=2 � F%=1
�
� �tFK
��:� squ%,mrk%:� squ%=G%
�0A%(G%)=mrk%+400:� game=1 � G%=5 � A%(5)=418 
�� d%=F% � G%-2 � 2
�� d%=G% � �DDL
� d%<>14 � �T\L
 � � (X$="E" � O$="E") � �DDL
e%=(G%+d%)/2
&� e%<>14 � �TzL
0� �(X$="E" � O$="E")� �DDL
:*� �V(e%)-�V(d%)=�V(G%)-�V(e%) � �award
D�
N� d%=1 � G%-1
X� d%=G% � �thL
b� d%<>14 � �DvL
l� �(X$="E" � O$="E") � �thL
ve%=2*G%-d%
�� e%>H% � �thL
�� e%<>14 � �t^L
�� �(X$="E" � O$="E") � �thL
�+� �V(G%)-�V(d%)=�V(e%)-�V(G%) � �award 
��
�� d%=G%+1 � H%
�� d%>=H% � �TLM
�� d%<>14 � �dZL
�� �(X$="E" � O$="E") � �TLM
�e%=2*d%-G%
�� e%>H% � �TLM
�� e%<>14 � �TBM
�� �(X$="E" � O$="E") � �TLM

+� �V(e%)-�V(d%)=�V(d%)-�V(G%) � �award 

�

�show(G%,230)

 �

*�19,0,0,0,0,0

4start%=2+�(H%-4):b%=0:s%=0

> � g%=start% � H%:�bestmove:�

H$� g%=1 � (start%-1):�bestmove:� 

R�

\,��bestmove:� A%(g%)>b% � s%=g%:b%=A%(g%)

f�

p��award

z#J%=L%(e%)�400*4+L%(d%)�400*4+P%

�(� �(J%)=9 � game=4 � status=0 � J%=1

�
� �d^M

�+� �(J%)=7 � game=5 � A%(G%)=A%(G%)+65:�

��:� K%,M%:� K%=�(J%)

�A%(G%)=A%(G%)+M%

��1,-(J%+3)/2,G%*8,1

�*FX15,1

�/� �(J%)=1 � �(L%(d%))>28 � A%(G%)=A%(G%)-50

��

�!� 1,10,3,20,5,40,7,400,9,4000

���fivend

�� J%,K%,M%

��:�19,0,1,0,0,0

nt=0:cr=0

�print
� J%=1 � H%-2
$� K%=J%+1 � H%-1
.M%=2*K%-J%
8� M%>H% � �D~N
B)� L%(K%)-L%(J%)<>L%(M%)-L%(K%) � �D~N
L2�show(J%,230):�show(K%,230):�show(M%,230)     
V�WAIT(.5)      
`M� L%(K%)<0 � nt=nt+1:�print:�show(K%,231):�show(J%,231):�show(M%,231)    
jM� L%(K%)>28 � cr=cr+1:�print:�show(J%,233):�show(K%,233):�show(M%,233)   
t�WAIT(.5)      
~� 
�� 
��19,0,0,0,0,0  
��  
�
��print  
�� 
��;"Counting" 
��31,1,4,231,31,1,6,233   
��4,4);nt;�4,6);cr 
� �
�
00000000  0d 00 0a 32 f4 3a 43 4f  4d 50 4f 58 3a 54 68 72  |...2.:COMPOX:Thr|
00000010  65 65 2d 64 69 6d 65 6e  73 69 6f 6e 61 6c 20 4e  |ee-dimensional N|
00000020  6f 75 67 68 74 73 20 61  6e 64 20 43 72 6f 73 73  |oughts and Cross|
00000030  65 73 0d 00 14 18 f4 28  43 29 20 4d 49 43 52 4f  |es.....(C) MICRO|
00000040  20 55 53 45 52 20 31 39  38 34 0d 00 19 06 eb 33  | USER 1984.....3|
00000050  0d 00 1e 0e 40 25 3d 34  3a 6c 61 77 3d b9 0d 00  |....@%=4:law=...|
00000060  28 17 2a 4b 45 59 31 30  22 20 20 4f 2e 7c 4d 52  |(.*KEY10"  O.|MR|
00000070  55 4e 7c 4d 22 0d 00 32  1c de 20 4c 25 28 32 37  |UN|M"..2.. L%(27|
00000080  29 2c 74 65 73 74 25 28  34 29 2c 41 25 28 32 37  |),test%(4),A%(27|
00000090  29 0d 00 3c 06 eb 35 0d  00 46 9b 20 e2 20 31 2c  |)..<..5..F. . 1,|
000000a0  38 2c 31 2c 2d 31 2c 31  2c 31 2c 31 2c 31 2c 31  |8,1,-1,1,1,1,1,1|
000000b0  32 31 2c 2d 31 30 2c 2d  35 2c 2d 32 2c 31 32 30  |21,-10,-5,-2,120|
000000c0  2c 31 32 30 3a e2 32 2c  31 2c 30 2c 30 2c 30 2c  |,120:.2,1,0,0,0,|
000000d0  30 2c 30 2c 30 2c 31 32  36 2c 2d 31 2c 30 2c 2d  |0,0,0,126,-1,0,-|
000000e0  33 2c 31 32 36 2c 31 32  36 3a e2 33 2c 33 2c 31  |3,126,126:.3,3,1|
000000f0  2c 31 2c 31 2c 31 2c 31  2c 31 2c 37 30 2c 2d 31  |,1,1,1,1,1,70,-1|
00000100  2c 2d 31 2c 2d 31 2c 36  39 2c 30 3a e2 34 2c 32  |,-1,-1,69,0:.4,2|
00000110  2c 30 2c 35 30 2c 2d 33  30 2c 32 2c 31 2c 32 2c  |,0,50,-30,2,1,2,|
00000120  31 32 37 2c 2d 34 2c 2d  32 2c 2d 31 2c 31 32 36  |127,-4,-2,-1,126|
00000130  2c 30 0d 00 50 92 ef 32  38 2c 31 31 2c 33 31 2c  |,0..P..28,11,31,|
00000140  31 39 2c 31 37 2c 31 39  2c 31 2c 32 2c 30 2c 30  |19,17,19,1,2,0,0|
00000150  2c 30 2c 32 33 2c 32 33  31 2c 31 31 32 2c 32 31  |,0,23,231,112,21|
00000160  36 2c 32 31 36 2c 32 31  36 2c 32 31 36 2c 32 31  |6,216,216,216,21|
00000170  36 2c 32 31 36 2c 31 31  32 2c 32 33 2c 32 33 33  |6,216,112,23,233|
00000180  2c 32 31 36 2c 32 31 36  2c 31 31 32 2c 31 31 32  |,216,216,112,112|
00000190  2c 31 31 32 2c 31 31 32  2c 32 31 36 2c 32 31 36  |,112,112,216,216|
000001a0  2c 32 33 2c 32 34 32 2c  30 2c 31 36 38 2c 38 30  |,23,242,0,168,80|
000001b0  2c 31 36 38 2c 38 30 2c  31 36 38 2c 38 30 2c 31  |,168,80,168,80,1|
000001c0  36 38 20 20 0d 00 5a 90  ef 32 33 2c 32 33 30 2c  |68  ..Z..23,230,|
000001d0  30 2c 30 2c 30 2c 33 32  2c 33 32 2c 30 2c 30 2c  |0,0,0,32,32,0,0,|
000001e0  30 2c 32 33 2c 32 34 30  2c 32 34 38 2c 32 34 38  |0,23,240,248,248|
000001f0  2c 32 34 38 2c 32 34 38  2c 32 34 38 2c 32 34 38  |,248,248,248,248|
00000200  2c 32 34 38 2c 32 34 38  2c 32 33 2c 32 34 31 2c  |,248,248,23,241,|
00000210  32 34 38 2c 32 31 36 2c  31 33 36 2c 31 36 38 2c  |248,216,136,168,|
00000220  31 36 38 2c 31 33 36 2c  32 31 36 2c 32 34 38 2c  |168,136,216,248,|
00000230  32 33 2c 32 34 33 2c 32  34 38 2c 30 2c 31 33 36  |23,243,248,0,136|
00000240  2c 32 31 36 2c 32 31 36  2c 31 33 36 2c 30 2c 32  |,216,216,136,0,2|
00000250  34 38 20 20 0d 00 64 0b  2a 46 58 31 35 2c 30 0d  |48  ..d.*FX15,0.|
00000260  00 6e 3e 20 f2 62 6f 61  72 64 3a f2 71 75 65 72  |.n> .board:.quer|
00000270  79 3a d4 32 2c 32 2c 31  35 30 2c 31 30 3a e7 20  |y:.2,2,150,10:. |
00000280  51 24 3d 22 4e 22 20 84  20 51 24 3d 22 6e 22 20  |Q$="N" . Q$="n" |
00000290  8c 20 8d 74 4c 40 20 8b  20 8d 44 78 40 0d 00 78  |. .tL@ . .Dx@..x|
000002a0  33 eb 37 3a f2 69 6e 73  74 72 75 63 74 3a d4 32  |3.7:.instruct:.2|
000002b0  2c 32 2c 38 35 2c 35 3a  e7 20 51 24 3d 22 51 22  |,2,85,5:. Q$="Q"|
000002c0  84 20 51 24 3d 22 71 22  20 8c 20 8d 74 4c 40 20  |. Q$="q" . .tL@ |
000002d0  0d 00 82 38 20 eb 35 3a  ef 32 38 2c 31 31 2c 33  |...8 .5:.28,11,3|
000002e0  31 2c 31 39 2c 31 37 2c  31 39 2c 31 2c 32 2c 30  |1,19,17,19,1,2,0|
000002f0  2c 30 2c 30 3a f2 73 65  74 75 70 3a f2 64 65 6d  |,0,0:.setup:.dem|
00000300  6f 3a e5 20 8d 44 78 40  0d 00 8c 05 f5 0d 00 96  |o:. .Dx@........|
00000310  16 eb 34 3a f2 77 68 6f  3a f2 61 73 6b 3a eb 35  |..4:.who:.ask:.5|
00000320  20 20 20 0d 00 a0 20 ef  32 38 2c 31 31 2c 33 31  |   ... .28,11,31|
00000330  2c 31 39 2c 31 37 2c 31  39 2c 31 2c 32 2c 30 2c  |,19,17,19,1,2,0,|
00000340  30 2c 30 0d 00 aa 0a f2  73 74 61 72 74 0d 00 b4  |0,0.....start...|
00000350  1e f5 3a e7 74 6e 73 3d  6d 61 78 20 8c 20 6c 69  |..:.tns=max . li|
00000360  6e 65 3d a3 3a e5 20 8d  44 40 41 0d 00 be 16 50  |ne=.:. .D@A....P|
00000370  25 3d 50 25 2a 2d 31 3a  74 6e 73 3d 74 6e 73 2b  |%=P%*-1:tns=tns+|
00000380  31 0d 00 c8 17 f2 73 61  79 28 31 2c 32 2c bd 28  |1.....say(1,2,.(|
00000390  32 33 32 2b 50 25 29 29  0d 00 d2 28 20 e7 6e 31  |232+P%))...( .n1|
000003a0  24 3d 22 43 22 20 80 20  50 25 3d 2d 31 20 8c 20  |$="C" . P%=-1 . |
000003b0  f2 62 65 65 62 67 6f 3a  e5 20 8d 54 58 41 20 20  |.beebgo:. .TXA  |
000003c0  0d 00 dc 28 e7 20 6e 32  24 3d 22 43 22 20 80 20  |...(. n2$="C" . |
000003d0  50 25 3d 31 20 8c 20 f2  62 65 65 62 67 6f 3a e5  |P%=1 . .beebgo:.|
000003e0  20 8d 54 58 41 20 20 20  0d 00 e6 0a f1 3a e8 2c  | .TXA   .....:.,|
000003f0  47 24 0d 00 f0 14 74 65  73 74 25 3d b9 3a f2 76  |G$....test%=.:.v|
00000400  61 6c 69 64 3a f1 0d 00  fa 32 20 e7 20 74 65 73  |alid:....2 . tes|
00000410  74 25 3d a3 20 8c 20 f1  22 41 72 65 20 79 6f 75  |t%=. . ."Are you|
00000420  20 73 75 72 65 3f 22 3a  f2 74 75 6e 65 33 28 32  | sure?":.tune3(2|
00000430  35 29 3a e5 8d 64 52 40  0d 01 04 59 f2 63 61 6c  |5):..dR@...Y.cal|
00000440  63 3a f2 6c 65 67 61 6c  28 73 25 29 3a e7 20 94  |c:.legal(s%):. .|
00000450  28 4c 25 28 73 25 29 29  3e 32 37 20 8c 20 f1 22  |(L%(s%))>27 . ."|
00000460  41 6c 72 65 61 64 79 20  20 74 61 6b 65 6e 21 22  |Already  taken!"|
00000470  3a f2 74 75 6e 65 31 28  34 2c 73 25 29 3a f2 74  |:.tune1(4,s%):.t|
00000480  75 6e 65 33 28 36 30 29  3a e5 8d 64 52 40 20 20  |une3(60):..dR@  |
00000490  20 0d 01 0e 3b e7 20 6c  61 77 3d a3 20 8c 20 f1  | ...;. law=. . .|
000004a0  22 20 20 20 4e 6f 74 20  20 61 6c 6c 6f 77 65 64  |"   Not  allowed|
000004b0  22 3a f2 74 75 6e 65 31  28 34 2c 73 25 29 3a f2  |":.tune1(4,s%):.|
000004c0  74 75 6e 65 32 3a e5 20  8d 64 52 40 0d 01 18 35  |tune2:. .dR@...5|
000004d0  f2 73 68 6f 77 28 73 25  2c 32 33 32 2b 50 25 29  |.show(s%,232+P%)|
000004e0  3a f2 74 75 6e 65 31 28  50 25 2b 32 2c 73 25 29  |:.tune1(P%+2,s%)|
000004f0  3a 4c 25 28 73 25 29 3d  a4 56 28 73 25 29 2a 50  |:L%(s%)=.V(s%)*P|
00000500  25 0d 01 22 47 e7 20 74  6e 73 3e 32 32 20 8c 20  |%.."G. tns>22 . |
00000510  f1 27 3b 74 6e 73 3b 22  62 6f 78 65 73 22 27 22  |.';tns;"boxes"'"|
00000520  61 72 65 20 6e 6f 77 22  27 22 74 61 6b 65 6e 2e  |are now"'"taken.|
00000530  22 27 6d 61 78 3b 22 74  6f 74 61 6c 22 27 22 61  |"'max;"total"'"a|
00000540  6c 6c 6f 77 65 64 21 22  0d 01 2c 13 e7 20 67 61  |llowed!"..,.. ga|
00000550  6d 65 3d 35 20 8c 20 8d  44 54 41 0d 01 36 08 f2  |me=5 . .DTA..6..|
00000560  74 72 79 0d 01 40 16 fd  20 6c 69 6e 65 3d b9 20  |try..@.. line=. |
00000570  84 20 74 6e 73 3d 6d 61  78 0d 01 4a 0a e5 20 8d  |. tns=max..J.. .|
00000580  44 68 41 0d 01 54 0d fd  20 74 6e 73 3d 6d 61 78  |DhA..T.. tns=max|
00000590  0d 01 5e 1d e7 20 67 61  6d 65 3d 35 20 8c 20 f2  |..^.. game=5 . .|
000005a0  66 69 76 65 6e 64 3a e5  20 8d 74 46 41 0d 01 68  |fivend:. .tFA..h|
000005b0  19 e7 20 6c 69 6e 65 3d  b9 20 8c 20 f2 72 6f 77  |.. line=. . .row|
000005c0  3a e5 8d 44 7c 41 0d 01  72 1c e7 20 74 6e 73 3d  |:..D|A..r.. tns=|
000005d0  6d 61 78 20 8c 20 f2 64  72 61 77 3a e5 20 8d 74  |max . .draw:. .t|
000005e0  46 41 0d 01 7c 1b f2 68  6f 77 6d 61 6e 79 3a e7  |FA..|..howmany:.|
000005f0  20 65 6e 64 3d a3 20 8c  20 8d 74 74 40 0d 01 86  | end=. . .tt@...|
00000600  16 f1 22 41 4e 4f 54 48  45 52 20 20 47 41 4d 45  |.."ANOTHER  GAME|
00000610  20 3f 22 0d 01 90 0b fd  20 be 3d 22 4e 22 0d 01  | ?"..... .="N"..|
00000620  9a 15 db 3a da 3a ef 31  39 2c 30 2c 31 2c 30 2c  |...:.:.19,0,1,0,|
00000630  30 2c 30 0d 01 a4 08 e6  30 2c 33 0d 01 ae 0f ec  |0,0.....0,3.....|
00000640  32 30 30 2c 35 30 30 3a  ef 35 0d 01 b8 1c f1 22  |200,500:.5....."|
00000650  47 6f 6f 64 62 79 65 2c  4b 65 6e 2e 21 22 3a ef  |Goodbye,Ken.!":.|
00000660  20 34 2c 32 36 20 0d 01  c2 05 e0 0d 01 cc 95 dc  | 4,26 ..........|
00000670  31 2c 31 30 38 2c 35 32  38 2c 32 2c 31 30 38 2c  |1,108,528,2,108,|
00000680  33 38 34 2c 33 2c 31 30  38 2c 32 34 30 2c 34 2c  |384,3,108,240,4,|
00000690  32 35 32 2c 35 32 38 2c  35 2c 32 35 32 2c 33 38  |252,528,5,252,38|
000006a0  34 2c 36 2c 32 35 32 2c  32 34 30 2c 37 2c 33 39  |4,6,252,240,7,39|
000006b0  36 2c 35 32 38 2c 38 2c  33 39 36 2c 33 38 34 2c  |6,528,8,396,384,|
000006c0  39 2c 33 39 36 2c 32 34  30 2c 31 30 2c 33 30 30  |9,396,240,10,300|
000006d0  2c 37 32 30 2c 31 31 2c  33 30 30 2c 35 37 36 2c  |,720,11,300,576,|
000006e0  31 32 2c 33 30 30 2c 34  33 32 2c 31 33 2c 34 34  |12,300,432,13,44|
000006f0  34 2c 37 32 30 2c 31 34  2c 34 34 34 2c 35 37 36  |4,720,14,444,576|
00000700  0d 01 d6 94 dc 20 31 35  2c 34 34 34 2c 34 33 32  |..... 15,444,432|
00000710  2c 31 36 2c 35 38 38 2c  37 32 30 2c 31 37 2c 35  |,16,588,720,17,5|
00000720  38 38 2c 35 37 36 2c 31  38 2c 35 38 38 2c 34 33  |88,576,18,588,43|
00000730  32 2c 31 39 2c 34 39 32  2c 39 31 32 2c 32 30 2c  |2,19,492,912,20,|
00000740  34 39 32 2c 37 36 38 2c  32 31 2c 34 39 32 2c 36  |492,768,21,492,6|
00000750  32 34 2c 32 32 2c 36 33  36 2c 39 31 32 2c 32 33  |24,22,636,912,23|
00000760  2c 36 33 36 2c 37 36 38  2c 32 34 2c 36 33 36 2c  |,636,768,24,636,|
00000770  36 32 34 2c 32 35 2c 37  38 30 2c 39 31 32 2c 32  |624,25,780,912,2|
00000780  36 2c 37 38 30 2c 37 36  38 2c 32 37 2c 37 38 30  |6,780,768,27,780|
00000790  2c 36 32 34 0d 01 e0 17  dd 20 f2 73 68 6f 77 28  |,624..... .show(|
000007a0  6c 6f 63 25 2c 73 69 67  6e 25 29 0d 01 ea 21 f7  |loc%,sign%)...!.|
000007b0  20 8d 64 4c 41 3a f5 3a  f3 20 6e 25 2c 78 25 2c  | .dLA:.:. n%,x%,|
000007c0  79 25 3a fd 20 6e 25 3d  6c 6f 63 25 0d 01 f4 0d  |y%:. n%=loc%....|
000007d0  ea 20 74 25 3a 74 25 3d  33 0d 01 fe 13 e7 20 6c  |. t%:t%=3..... l|
000007e0  6f 63 25 3e 39 20 8c 20  74 25 3d 31 0d 02 08 14  |oc%>9 . t%=1....|
000007f0  e7 20 6c 6f 63 25 3e 31  38 20 8c 20 74 25 3d 32  |. loc%>18 . t%=2|
00000800  0d 02 12 41 ef 32 35 2c  34 2c 78 25 2b 38 3b 79  |...A.25,4,x%+8;y|
00000810  25 2d 38 3b 31 38 2c 30  2c 30 2c 35 2c 32 34 30  |%-8;18,0,0,5,240|
00000820  2c 32 35 2c 34 2c 78 25  2b 38 3b 79 25 2d 38 3b  |,25,4,x%+8;y%-8;|
00000830  31 38 2c 30 2c 74 25 2c  28 73 69 67 6e 25 29 2c  |18,0,t%,(sign%),|
00000840  34 0d 02 1c 14 d4 31 2c  32 2c 6c 6f 63 25 2a 38  |4.....1,2,loc%*8|
00000850  2b 31 36 2c 31 0d 02 26  05 e1 0d 02 30 0c dd 20  |+16,1..&....0.. |
00000860  f2 73 65 74 75 70 0d 02  3a 15 f2 74 61 62 6c 65  |.setup..:..table|
00000870  28 34 34 34 2c 39 36 30  2c 32 29 0d 02 44 15 f2  |(444,960,2)..D..|
00000880  74 61 62 6c 65 28 32 35  32 2c 37 36 38 2c 31 29  |table(252,768,1)|
00000890  0d 02 4e 14 f2 74 61 62  6c 65 28 36 30 2c 35 37  |..N..table(60,57|
000008a0  36 2c 33 29 0d 02 58 0a  f2 63 68 61 69 72 0d 02  |6,3)..X..chair..|
000008b0  62 05 e1 0d 02 6c 0c dd  20 f2 62 6f 61 72 64 0d  |b....l.. .board.|
000008c0  02 76 0a f2 73 65 74 75  70 0d 02 80 0b fb 33 3a  |.v..setup.....3:|
000008d0  fb 31 32 38 0d 02 8a 4a  f2 53 41 59 28 31 2c 22  |.128...J.SAY(1,"|
000008e0  20 20 33 2d 44 22 29 3a  f2 53 41 59 28 32 2c 22  |  3-D"):.SAY(2,"|
000008f0  4e 6f 75 67 68 74 73 22  29 3a f2 53 41 59 28 33  |Noughts"):.SAY(3|
00000900  2c 22 20 20 61 6e 64 22  29 3a f2 53 41 59 28 34  |,"  and"):.SAY(4|
00000910  2c 22 43 72 6f 73 73 65  73 22 29 20 20 20 0d 02  |,"Crosses")   ..|
00000920  94 11 e3 20 6c 6f 63 25  3d 31 20 b8 20 32 37 0d  |... loc%=1 . 27.|
00000930  02 9e 12 43 48 25 3d 32  33 31 2b 6c 6f 63 25 2a  |...CH%=231+loc%*|
00000940  32 0d 02 a8 20 e7 20 43  48 25 3e 32 33 33 20 8c  |2... . CH%>233 .|
00000950  20 43 48 25 3d 43 48 25  2d 34 3a e5 20 8d 74 68  | CH%=CH%-4:. .th|
00000960  42 0d 02 b2 13 f2 73 68  6f 77 28 6c 6f 63 25 2c  |B.....show(loc%,|
00000970  43 48 25 29 0d 02 bc 05  ed 0d 02 c6 05 e1 0d 02  |CH%)............|
00000980  d0 19 dd f2 74 61 62 6c  65 28 58 25 2c 59 25 2c  |....table(X%,Y%,|
00000990  63 6f 6c 6f 75 72 29 0d  02 da 0e e6 20 30 2c 63  |colour)..... 0,c|
000009a0  6f 6c 6f 75 72 0d 02 e4  1b e3 20 5a 25 3d 58 25  |olour..... Z%=X%|
000009b0  20 b8 20 28 58 25 2b 34  33 32 29 88 20 31 34 34  | . (X%+432). 144|
000009c0  0d 02 ee 17 ec 20 5a 25  2c 59 25 3a df 20 5a 25  |..... Z%,Y%:. Z%|
000009d0  2c 59 25 2d 34 33 32 0d  02 f8 08 ed 20 5a 25 0d  |,Y%-432..... Z%.|
000009e0  03 02 1a e3 20 5a 25 3d  59 25 20 b8 28 59 25 2d  |.... Z%=Y% .(Y%-|
000009f0  34 33 32 29 88 2d 31 34  34 0d 03 0c 19 ec 20 58  |432).-144..... X|
00000a00  25 2c 5a 25 3a df 20 28  58 25 2b 34 33 32 29 2c  |%,Z%:. (X%+432),|
00000a10  5a 25 0d 03 16 09 ed 20  5a 25 20 0d 03 20 05 e1  |Z%..... Z% .. ..|
00000a20  0d 03 2a 0b dd f2 63 68  61 69 72 0d 03 34 08 e6  |..*...chair..4..|
00000a30  30 2c 31 0d 03 3e 55 ef  32 35 2c 34 2c 36 30 3b  |0,1..>U.25,4,60;|
00000a40  35 37 36 3b 32 35 2c 32  31 2c 34 34 34 3b 39 36  |576;25,21,444;96|
00000a50  30 3b 32 35 2c 34 2c 34  39 32 3b 35 37 36 3b 32  |0;25,4,492;576;2|
00000a60  35 2c 32 31 2c 38 37 36  3b 39 36 30 3b 32 35 2c  |5,21,876;960;25,|
00000a70  34 2c 34 39 32 3b 31 34  34 3b 32 35 2c 32 31 2c  |4,492;144;25,21,|
00000a80  38 37 36 3b 35 32 38 3b  0d 03 48 0d ef 35 2c 31  |876;528;..H..5,1|
00000a90  38 2c 30 2c 32 0d 03 52  67 ef 32 35 2c 34 2c 34  |8,0,2..Rg.25,4,4|
00000aa0  38 34 3b 31 30 30 30 3b  36 35 2c 32 35 2c 34 2c  |84;1000;65,25,4,|
00000ab0  36 32 38 3b 31 30 30 30  3b 36 36 2c 32 35 2c 34  |628;1000;66,25,4|
00000ac0  2c 37 37 32 3b 31 30 30  30 3b 36 37 2c 32 35 2c  |,772;1000;67,25,|
00000ad0  34 2c 38 39 32 3b 39 30  34 3b 34 39 2c 32 35 2c  |4,892;904;49,25,|
00000ae0  34 2c 38 39 32 3b 37 36  30 3b 35 30 2c 32 35 2c  |4,892;760;50,25,|
00000af0  34 2c 38 39 32 3b 36 31  36 3b 35 31 0d 03 5c 08  |4,892;616;51..\.|
00000b00  e6 30 2c 33 0d 03 66 60  ef 32 35 2c 34 2c 31 30  |.0,3..f`.25,4,10|
00000b10  30 3b 31 32 38 3b 36 35  2c 32 35 2c 34 2c 32 34  |0;128;65,25,4,24|
00000b20  34 3b 31 32 38 3b 36 36  2c 32 35 2c 34 2c 33 38  |4;128;66,25,4,38|
00000b30  38 3b 31 32 38 3b 36 37  2c 32 35 2c 34 2c 30 3b  |8;128;67,25,4,0;|
00000b40  32 33 32 3b 35 31 2c 32  35 2c 34 2c 30 3b 33 37  |232;51,25,4,0;37|
00000b50  36 3b 35 30 2c 32 35 2c  34 2c 30 3b 35 32 30 3b  |6;50,25,4,0;520;|
00000b60  34 39 2c 34 0d 03 70 05  e1 0d 03 7a 16 dd f2 53  |49,4..p....z...S|
00000b70  41 59 28 6c 69 6e 65 25  2c 77 6f 72 64 24 29 0d  |AY(line%,word$).|
00000b80  03 84 18 f2 73 61 79 28  6c 69 6e 65 25 2c 30 2c  |....say(line%,0,|
00000b90  77 6f 72 64 24 29 20 0d  03 8e 05 e1 0d 03 98 1c  |word$) .........|
00000ba0  dd f2 73 61 79 28 6c 69  6e 65 25 2c 73 74 61 72  |..say(line%,star|
00000bb0  74 2c 77 6f 72 64 24 29  0d 03 a2 1b ea 20 59 25  |t,word$)..... Y%|
00000bc0  3a 59 25 3d 28 31 30 30  30 2d 6c 69 6e 65 25 2a  |:Y%=(1000-line%*|
00000bd0  33 32 29 0d 03 ac 3d ef  32 35 2c 34 2c 30 3b 59  |32)...=.25,4,0;Y|
00000be0  25 3b 32 35 2c 33 2c 34  33 32 3b 30 3b 32 35 2c  |%;25,3,432;0;25,|
00000bf0  38 33 2c 30 3b 2d 33 32  3b 32 35 2c 33 2c 2d 34  |83,0;-32;25,3,-4|
00000c00  33 32 3b 30 3b 32 35 2c  38 33 2c 30 3b 33 32 3b  |32;0;25,83,0;32;|
00000c10  0d 03 b6 20 ef 20 35 2c  31 38 2c 30 2c 32 2c 32  |... . 5,18,0,2,2|
00000c20  35 2c 34 2c 73 74 61 72  74 2a 36 34 3b 59 25 3b  |5,4,start*64;Y%;|
00000c30  0d 03 c0 0c f1 20 3b 77  6f 72 64 24 0d 03 ca 07  |..... ;word$....|
00000c40  ef 20 34 0d 03 d4 05 e1  0d 03 de 0e dd f2 69 6e  |. 4...........in|
00000c50  73 74 72 75 63 74 0d 03  e8 b9 f1 27 27 22 20 20  |struct.....''"  |
00000c60  59 6f 75 20 68 61 76 65  20 6a 75 73 74 20 73 65  |You have just se|
00000c70  65 6e 20 61 20 63 75 62  65 20 6f 66 20 32 37 20  |en a cube of 27 |
00000c80  62 6f 78 65 73 2e 49 6e  20 63 61 73 65 20 79 6f  |boxes.In case yo|
00000c90  75 20 68 61 76 65 20 6e  65 76 65 72 20 70 6c 61  |u have never pla|
00000ca0  79 65 64 2c 74 68 65 20  69 64 65 61 20 20 69 73  |yed,the idea  is|
00000cb0  20 66 6f 72 20 6f 6e 65  20 70 6c 61 79 65 72 20  | for one player |
00000cc0  74 6f 20 74 72 79 20 74  6f 20 67 65 74 20 74 68  |to try to get th|
00000cd0  72 65 65 20 20 20 6e 6f  75 67 68 74 73 20 69 6e  |ree   noughts in|
00000ce0  20 61 20 72 6f 77 20 66  69 72 73 74 2c 61 6e 64  | a row first,and|
00000cf0  20 66 6f 72 20 74 68 65  20 6f 74 68 65 72 74 68  | for the otherth|
00000d00  72 65 65 20 63 72 6f 73  73 65 73 2e 22 20 20 0d  |ree crosses."  .|
00000d10  03 f2 8d f1 27 22 20 54  68 65 20 72 6f 77 20 63  |....'" The row c|
00000d20  61 6e 20 62 65 20 68 6f  72 69 7a 6f 6e 74 61 6c  |an be horizontal|
00000d30  2c 76 65 72 74 69 63 61  6c 2c 20 6f 72 20 64 69  |,vertical, or di|
00000d40  61 67 6f 6e 61 6c 2e 54  68 65 20 63 75 62 65 20  |agonal.The cube |
00000d50  69 73 2c 20 6f 66 20 63  6f 75 72 73 65 20 74 68  |is, of course th|
00000d60  72 65 65 2d 20 20 64 69  6d 65 6e 73 69 6f 6e 61  |ree-  dimensiona|
00000d70  6c 2c 61 6e 64 20 79 6f  75 72 20 72 6f 77 20 63  |l,and your row c|
00000d80  61 6e 20 62 65 20 69 6e  20 61 6e 79 20 20 64 69  |an be in any  di|
00000d90  72 65 63 74 69 6f 6e 21  22 20 20 20 0d 03 fc 8f  |rection!"   ....|
00000da0  f1 27 22 20 49 6e 20 74  68 69 73 20 76 65 72 73  |.'" In this vers|
00000db0  69 6f 6e 2c 20 27 4f 27  20 61 6c 77 61 79 73 20  |ion, 'O' always |
00000dc0  67 6f 65 73 20 66 69 72  73 74 2c 61 6e 64 20 79  |goes first,and y|
00000dd0  6f 75 20 63 61 6e 20 63  68 6f 6f 73 65 20 76 61  |ou can choose va|
00000de0  72 69 6f 75 73 20 73 6b  69 6c 6c 20 6c 65 76 65  |rious skill leve|
00000df0  6c 73 2c 73 6f 6d 65 20  70 6f 73 69 74 69 6f 6e  |ls,some position|
00000e00  73 20 62 65 69 6e 67 20  69 6c 6c 65 67 61 6c 20  |s being illegal |
00000e10  61 73 20 79 6f 75 20 67  65 74 20 6d 6f 72 65 20  |as you get more |
00000e20  64 69 66 66 69 63 75 6c  74 2e 22 0d 04 06 52 f1  |difficult."...R.|
00000e30  27 22 20 54 6f 20 6d 6f  76 65 2c 67 69 76 65 20  |'" To move,give |
00000e40  74 68 65 20 63 6f 6c 6f  75 72 2c 72 6f 77 20 6e  |the colour,row n|
00000e50  75 6d 62 65 72 20 61 6e  64 20 63 6f 6c 75 6d 6e  |umber and column|
00000e60  20 6c 65 74 74 65 72 20  6f 66 20 74 68 65 20 72  | letter of the r|
00000e70  65 71 75 69 72 65 64 20  62 6f 78 2e 22 0d 04 10  |equired box."...|
00000e80  a7 f1 27 22 20 49 6e 20  74 68 65 20 64 65 6d 6f  |..'" In the demo|
00000e90  6e 73 74 72 61 74 69 6f  6e 20 77 68 69 63 68 20  |nstration which |
00000ea0  66 6f 6c 6c 6f 77 73 2c  20 20 20 20 74 68 65 72  |follows,    ther|
00000eb0  65 20 69 73 20 61 20 6e  6f 75 67 68 74 20 6f 6e  |e is a nought on|
00000ec0  20 57 32 43 20 61 6e 64  20 61 20 63 72 6f 73 73  | W2C and a cross|
00000ed0  20 6f 6e 20 47 33 42 21  2e 50 72 65 73 73 20 61  | on G3B!.Press a|
00000ee0  6e 79 20 6b 65 79 20 66  6f 72 20 74 68 65 20 64  |ny key for the d|
00000ef0  65 6d 6f 6e 73 74 72 61  74 69 6f 6e 61 6e 64 20  |emonstrationand |
00000f00  74 68 65 20 6b 65 79 20  27 51 27 20 77 68 65 6e  |the key 'Q' when|
00000f10  20 79 6f 75 20 75 6e 64  65 72 73 74 61 6e 64 2e  | you understand.|
00000f20  22 20 20 20 0d 04 1a 09  20 51 24 3d be 0d 04 24  |"   .... Q$=...$|
00000f30  05 e1 0d 04 2e 0a dd f2  64 65 6d 6f 0d 04 38 2c  |........demo..8,|
00000f40  20 f2 64 69 73 70 6c 61  79 3a f2 73 68 6f 77 28  | .display:.show(|
00000f50  38 2c 32 33 31 29 3a f2  73 68 6f 77 28 31 35 2c  |8,231):.show(15,|
00000f60  32 33 33 29 20 20 20 20  0d 04 42 32 f1 22 54 68  |233)    ..B2."Th|
00000f70  65 72 65 27 73 20 61 6e  6f 75 67 68 74 20 6f 6e  |ere's anought on|
00000f80  57 32 43 20 61 6e 64 20  61 63 72 6f 73 73 20 6f  |W2C and across o|
00000f90  6e 20 47 33 42 21 22 20  20 20 0d 04 4c 05 f1 0d  |n G3B!"   ..L...|
00000fa0  04 56 3f f1 22 44 6f 20  6e 6f 74 20 20 20 6d 6f  |.V?."Do not   mo|
00000fb0  76 65 20 6f 6e 20 20 75  6e 74 69 6c 20 79 6f 75  |ve on  until you|
00000fc0  61 72 65 20 73 75 72 65  20 74 68 61 74 20 79 6f  |are sure that yo|
00000fd0  75 20 75 6e 64 65 72 73  74 61 6e 64 21 22 0d 04  |u understand!"..|
00000fe0  60 51 f2 57 41 49 54 28  32 29 3a f2 53 41 59 28  |`Q.WAIT(2):.SAY(|
00000ff0  31 2c 22 50 72 65 73 73  22 29 3a f2 53 41 59 28  |1,"Press"):.SAY(|
00001000  32 2c 22 61 6e 79 20 6b  65 79 22 29 3a f2 53 41  |2,"any key"):.SA|
00001010  59 28 33 2c 22 74 6f 20  63 6f 6e 2d 22 29 3a f2  |Y(3,"to con-"):.|
00001020  53 41 59 28 34 2c 22 74  69 6e 75 65 2e 22 29 0d  |SAY(4,"tinue.").|
00001030  04 6a 0b 2a 46 58 31 35  2c 30 0d 04 74 09 f5 20  |.j.*FX15,0..t.. |
00001040  fd 20 a5 0d 04 7e 05 e1  0d 04 88 0c 20 dd f2 73  |. ...~...... ..s|
00001050  74 61 72 74 0d 04 92 0a  f2 73 65 74 75 70 0d 04  |tart.....setup..|
00001060  9c 2f e3 20 6c 6f 63 25  3d 31 b8 32 37 3a 4c 25  |./. loc%=1.27:L%|
00001070  28 6c 6f 63 25 29 3d 6c  6f 63 25 3a f2 73 68 6f  |(loc%)=loc%:.sho|
00001080  77 28 6c 6f 63 25 2c 32  33 30 29 3a ed 0d 04 a6  |w(loc%,230):....|
00001090  37 e3 20 6c 6f 63 25 3d  31 b8 32 37 3a 41 25 28  |7. loc%=1.27:A%(|
000010a0  6c 6f 63 25 29 3d 30 3a  ed 3a e3 20 6c 6f 63 25  |loc%)=0:.:. loc%|
000010b0  3d 31 b8 34 3a 74 65 73  74 25 28 6c 6f 63 25 29  |=1.4:test%(loc%)|
000010c0  3d 30 3a ed 0d 04 b0 22  db 3a f1 20 bd 28 32 33  |=0:....".:. .(23|
000010d0  31 29 3b 22 20 74 6f 20  67 6f 20 20 20 20 66 69  |1);" to go    fi|
000010e0  72 73 74 2e 22 20 0d 04  ba 1c e7 20 4f 24 3d 22  |rst." ..... O$="|
000010f0  45 22 20 84 20 58 24 3d  22 45 22 20 8c 20 8d 64  |E" . X$="E" . .d|
00001100  4e 44 0d 04 c4 11 f2 73  68 6f 77 28 31 34 2c 32  |ND.....show(14,2|
00001110  34 32 29 0d 04 ce 17 50  25 3d 31 3a 74 6e 73 3d  |42)....P%=1:tns=|
00001120  30 3a 73 74 61 74 75 73  3d 30 0d 04 d8 14 e7 20  |0:status=0..... |
00001130  67 61 6d 65 3c 3e 31 20  8c 20 8d 54 40 45 0d 04  |game<>1 . .T@E..|
00001140  e2 11 e3 20 73 71 25 3d  31 30 20 b8 20 32 37 0d  |... sq%=10 . 27.|
00001150  04 ec 12 f2 73 68 6f 77  28 73 71 25 2c 32 34 32  |....show(sq%,242|
00001160  29 0d 04 f6 05 ed 0d 05  00 42 f2 53 41 59 28 31  |)........B.SAY(1|
00001170  2c 22 20 20 20 22 29 3a  f2 53 41 59 28 34 2c 22  |,"   "):.SAY(4,"|
00001180  74 6f 20 67 6f 2e 22 29  3a f2 53 41 59 28 33 2c  |to go."):.SAY(3,|
00001190  22 20 20 20 22 29 3a f2  53 41 59 28 32 2c 22 20  |"   "):.SAY(2," |
000011a0  20 20 22 29 3a f1 20 20  0d 05 0a 4f f1 22 54 59  |  "):.  ...O."TY|
000011b0  50 45 20 59 4f 55 52 20  20 20 20 20 20 20 20 20  |PE YOUR         |
000011c0  53 51 55 41 52 45 2e 20  20 20 20 20 20 20 20 20  |SQUARE.         |
000011d0  20 20 63 6f 6c 6f 75 72  3a 20 20 6e 75 6d 62 65  |  colour:  numbe|
000011e0  72 3a 20 20 6c 65 74 74  65 72 3a 22 20 20 20 20  |r:  letter:"    |
000011f0  20 20 20 20 20 20 20 0d  05 14 05 e1 0d 05 1e 0e  |       .........|
00001200  dd 20 f2 57 41 49 54 28  57 29 0d 05 28 12 e3 20  |. .WAIT(W)..(.. |
00001210  77 3d 31 20 b8 20 57 2a  31 38 30 30 0d 05 32 06  |w=1 . W*1800..2.|
00001220  ed 77 0d 05 3c 05 e1 0d  05 46 36 dd 20 a4 56 28  |.w..<....F6. .V(|
00001230  42 25 29 3d 35 31 31 2b  28 42 25 2d 31 29 81 39  |B%)=511+(B%-1).9|
00001240  2a 31 30 30 2b 28 42 25  2d 31 29 83 39 81 33 2a  |*100+(B%-1).9.3*|
00001250  31 30 2b 28 42 25 2d 31  29 83 39 83 33 0d 05 50  |10+(B%-1).9.3..P|
00001260  29 dc 57 2c 30 2c 47 2c  39 2c 59 2c 31 38 2c 31  |).W,0,G,9,Y,18,1|
00001270  2c 31 2c 32 2c 32 2c 33  2c 33 2c 41 2c 30 2c 42  |,1,2,2,3,3,A,0,B|
00001280  2c 33 2c 43 2c 36 0d 05  5a 0a dd f2 63 61 6c 63  |,3,C,6..Z...calc|
00001290  0d 05 64 0b ea 20 41 25  2c 42 25 0d 05 6e 0d 73  |..d.. A%,B%..n.s|
000012a0  25 3d 30 3a 76 25 3d 30  0d 05 78 0a f7 20 8d 44  |%=0:v%=0..x.. .D|
000012b0  50 45 0d 05 82 0e e3 20  41 25 3d 31 20 b8 20 33  |PE..... A%=1 . 3|
000012c0  0d 05 8c 05 f5 0d 05 96  0b f3 20 41 24 2c 42 25  |.......... A$,B%|
000012d0  0d 05 a0 12 fd 20 41 24  3d c1 47 24 2c 41 25 2c  |..... A$=.G$,A%,|
000012e0  31 29 0d 05 aa 0c 73 25  3d 73 25 2b 42 25 0d 05  |1)....s%=s%+B%..|
000012f0  b4 05 ed 0d 05 be 05 e1  0d 05 c8 0d dd f2 64 69  |..............di|
00001300  73 70 6c 61 79 0d 05 d2  11 e3 20 6c 6f 63 25 3d  |splay..... loc%=|
00001310  31 20 b8 20 32 37 0d 05  dc 13 f2 73 68 6f 77 28  |1 . 27.....show(|
00001320  6c 6f 63 25 2c 32 33 30  29 0d 05 e6 05 ed 0d 05  |loc%,230).......|
00001330  f0 05 e1 0d 05 fa 0b dd  f2 76 61 6c 69 64 0d 06  |.........valid..|
00001340  04 1d ea 20 58 25 2c 59  25 2c 59 24 2c 50 24 2c  |... X%,Y%,Y$,P$,|
00001350  51 24 2c 52 24 3a 67 24  3d 22 22 0d 06 0e 0e e3  |Q$,R$:g$="".....|
00001360  20 58 25 3d 31 20 b8 20  33 0d 06 18 13 59 25 3d  | X%=1 . 3....Y%=|
00001370  97 28 c1 47 24 2c 58 25  2c 31 29 29 0d 06 22 16  |.(.G$,X%,1))..".|
00001380  e7 20 59 25 3e 39 30 20  8c 20 59 25 3d 59 25 2d  |. Y%>90 . Y%=Y%-|
00001390  33 32 0d 06 2c 0f 67 24  3d 67 24 2b bd 28 59 25  |32..,.g$=g$+.(Y%|
000013a0  29 0d 06 36 0b ed 3a 47  24 3d 67 24 0d 06 40 10  |)..6..:G$=g$..@.|
000013b0  e3 20 58 25 3d 31 20 b8  20 33 20 20 0d 06 4a 10  |. X%=1 . 3  ..J.|
000013c0  59 24 3d c1 47 24 2c 58  25 2c 31 29 0d 06 54 22  |Y$=.G$,X%,1)..T"|
000013d0  e7 20 58 25 3d 31 20 8c  20 f2 69 6e 76 61 6c 69  |. X%=1 . .invali|
000013e0  64 28 22 47 22 2c 22 57  22 2c 22 59 22 29 0d 06  |d("G","W","Y")..|
000013f0  5e 22 e7 20 58 25 3d 32  20 8c 20 f2 69 6e 76 61  |^". X%=2 . .inva|
00001400  6c 69 64 28 22 31 22 2c  22 32 22 2c 22 33 22 29  |lid("1","2","3")|
00001410  0d 06 68 22 e7 20 58 25  3d 33 20 8c 20 f2 69 6e  |..h". X%=3 . .in|
00001420  76 61 6c 69 64 28 22 41  22 2c 22 42 22 2c 22 43  |valid("A","B","C|
00001430  22 29 0d 06 72 05 ed 0d  06 7c 24 74 65 73 74 25  |")..r....|$test%|
00001440  3d 74 65 73 74 25 28 31  29 80 74 65 73 74 25 28  |=test%(1).test%(|
00001450  32 29 80 74 65 73 74 25  28 33 29 0d 06 86 05 e1  |2).test%(3).....|
00001460  0d 06 90 17 dd f2 69 6e  76 61 6c 69 64 28 50 24  |......invalid(P$|
00001470  2c 51 24 2c 52 24 29 0d  06 9a 38 e7 20 59 24 3d  |,Q$,R$)...8. Y$=|
00001480  50 24 20 84 20 59 24 3d  51 24 20 84 20 59 24 3d  |P$ . Y$=Q$ . Y$=|
00001490  52 24 20 20 8c 20 74 65  73 74 25 28 58 25 29 3d  |R$  . test%(X%)=|
000014a0  b9 20 8b 20 74 65 73 74  25 28 58 25 29 3d a3 0d  |. . test%(X%)=..|
000014b0  06 a4 05 e1 0d 06 ae 09  dd f2 74 72 79 0d 06 b8  |..........try...|
000014c0  0a 6c 69 6e 65 3d a3 0d  06 c2 11 ea 20 44 25 2c  |.line=...... D%,|
000014d0  45 25 2c 64 25 2c 65 25  0d 06 cc 0f e3 20 64 25  |E%,d%,e%..... d%|
000014e0  3d 31 20 b8 20 32 37 0d  06 d6 19 e7 20 94 28 4c  |=1 . 27..... .(L|
000014f0  25 28 64 25 29 29 3c 32  38 20 8c 20 8d 44 62 47  |%(d%))<28 . .DbG|
00001500  0d 06 e0 12 e7 20 64 25  3d 73 25 20 8c 20 8d 44  |..... d%=s% . .D|
00001510  62 47 0d 06 ea 14 44 25  3d 4c 25 28 73 25 29 2d  |bG....D%=L%(s%)-|
00001520  4c 25 28 64 25 29 0d 06  f4 13 e7 20 44 25 3e 33  |L%(d%)..... D%>3|
00001530  30 30 20 8c 20 8d 44 62  47 0d 06 fe 0f e3 20 65  |00 . .DbG..... e|
00001540  25 3d 31 20 b8 20 32 37  0d 07 08 19 e7 20 94 28  |%=1 . 27..... .(|
00001550  4c 25 28 65 25 29 29 3c  32 38 20 8c 20 8d 44 58  |L%(e%))<28 . .DX|
00001560  47 0d 07 12 12 e7 20 65  25 3d 73 25 20 8c 20 8d  |G..... e%=s% . .|
00001570  44 58 47 0d 07 1c 15 e7  20 65 25 3d 64 25 20 8c  |DXG..... e%=d% .|
00001580  20 8d 44 58 47 20 20 20  0d 07 26 14 45 25 3d 4c  | .DXG   ..&.E%=L|
00001590  25 28 73 25 29 2d 4c 25  28 65 25 29 0d 07 30 13  |%(s%)-L%(e%)..0.|
000015a0  e7 20 45 25 3e 33 30 30  20 8c 20 8d 44 58 47 0d  |. E%>300 . .DXG.|
000015b0  07 3a 2c e7 20 94 28 45  25 29 3d 94 28 44 25 29  |.:,. .(E%)=.(D%)|
000015c0  20 8c 20 6c 69 6e 65 3d  b9 3a 70 25 3d 65 25 3a  | . line=.:p%=e%:|
000015d0  72 25 3d 64 25 3a 71 25  3d 73 25 0d 07 44 28 e7  |r%=d%:q%=s%..D(.|
000015e0  20 44 25 3d 32 2a 45 25  20 8c 20 6c 69 6e 65 3d  | D%=2*E% . line=|
000015f0  b9 3a 70 25 3d 64 25 3a  72 25 3d 73 25 3a 71 25  |.:p%=d%:r%=s%:q%|
00001600  3d 65 25 0d 07 4e 28 e7  20 44 25 3d 45 25 2f 32  |=e%..N(. D%=E%/2|
00001610  20 8c 20 6c 69 6e 65 3d  b9 3a 70 25 3d 65 25 3a  | . line=.:p%=e%:|
00001620  72 25 3d 73 25 3a 71 25  3d 64 25 0d 07 58 05 ed  |r%=s%:q%=d%..X..|
00001630  0d 07 62 05 ed 0d 07 6c  06 20 e1 0d 07 76 09 dd  |..b....l. ...v..|
00001640  f2 72 6f 77 0d 07 80 0a  f7 20 8d 64 4c 41 0d 07  |.row..... .dLA..|
00001650  8a 17 f5 3a f3 20 4c 25  2c 58 25 2c 59 25 3a fd  |...:. L%,X%,Y%:.|
00001660  70 25 3d 4c 25 0d 07 94  0b f7 20 8d 64 4c 41 20  |p%=L%..... .dLA |
00001670  0d 07 9e 18 f5 3a f3 20  4d 25 2c 78 25 2c 79 25  |.....:. M%,x%,y%|
00001680  3a fd 20 72 25 3d 4d 25  0d 07 a8 45 e6 30 2c 32  |:. r%=M%...E.0,2|
00001690  3a ec 20 78 25 2b 38 2c  79 25 2d 38 3a f0 32 31  |:. x%+8,y%-8:.21|
000016a0  2c 58 25 2b 38 2c 59 25  2d 38 3a e6 30 2c 33 3a  |,X%+8,Y%-8:.0,3:|
000016b0  ec 20 58 25 2b 32 34 2c  59 25 2d 32 34 3a f0 32  |. X%+24,Y%-24:.2|
000016c0  31 2c 78 25 2b 32 34 2c  79 25 2d 32 34 0d 07 b2  |1,x%+24,y%-24...|
000016d0  44 d4 31 2c 34 2c 70 25  2a 38 2b 31 36 2c 31 3a  |D.1,4,p%*8+16,1:|
000016e0  f2 57 41 49 54 28 2e 35  29 3a d4 31 2c 34 2c 72  |.WAIT(.5):.1,4,r|
000016f0  25 2a 38 2b 31 36 2c 31  3a f2 57 41 49 54 28 2e  |%*8+16,1:.WAIT(.|
00001700  35 29 3a d4 31 2c 34 2c  71 25 2a 38 2b 31 36 2c  |5):.1,4,q%*8+16,|
00001710  31 0d 07 bc 05 e1 0d 07  c6 09 dd f2 77 69 6e 0d  |1...........win.|
00001720  07 d0 3b 20 f1 20 27 27  c4 31 38 2c bd 28 32 33  |..; . ''.18,.(23|
00001730  32 2b 50 25 29 20 2b 22  22 29 3b 27 22 69 73 20  |2+P%) +"");'"is |
00001740  74 68 65 20 20 20 77 69  6e 6e 65 72 21 22 3a f2  |the   winner!":.|
00001750  74 75 6e 65 33 28 31 35  30 29 0d 07 da 05 e1 0d  |tune3(150)......|
00001760  07 e4 0f dd f2 6c 65 67  61 6c 28 74 25 29 0d 07  |.....legal(t%)..|
00001770  ee 09 6c 61 77 3d b9 0d  07 f8 1a e7 67 61 6d 65  |..law=......game|
00001780  3d 31 80 74 25 3e 39 20  8c 20 6c 61 77 3d a3 3a  |=1.t%>9 . law=.:|
00001790  e1 0d 08 02 16 e7 20 67  61 6d 65 3d 31 80 74 25  |...... game=1.t%|
000017a0  3c 31 30 20 8c 20 e1 0d  08 0c 1a e7 20 50 25 3c  |<10 . ...... P%<|
000017b0  30 20 8c 20 4c 24 3d 4f  24 20 8b 20 4c 24 3d 58  |0 . L$=O$ . L$=X|
000017c0  24 0d 08 16 10 e7 20 4c  24 3d 22 45 22 20 8c 20  |$..... L$="E" . |
000017d0  e1 0d 08 20 13 e7 20 74  25 3d 31 34 20 8c 20 6c  |... .. t%=14 . l|
000017e0  61 77 3d a3 0d 08 2a 12  e7 20 4c 24 3d 22 4d 22  |aw=...*.. L$="M"|
000017f0  20 8c 20 e1 20 20 0d 08  34 0a f7 20 8d 74 58 48  | . .  ..4.. .tXH|
00001800  0d 08 3e 0e e3 20 7a 25  3d 31 20 b8 20 38 0d 08  |..>.. z%=1 . 8..|
00001810  48 11 f3 20 5a 25 2c 68  25 2c 6a 25 2c 6b 25 0d  |H.. Z%,h%,j%,k%.|
00001820  08 52 13 e7 20 74 25 3c  3e 5a 25 20 8c 20 8d 74  |.R.. t%<>Z% . .t|
00001830  44 48 0d 08 5c 09 6c 61  77 3d a3 0d 08 66 1a e7  |DH..\.law=...f..|
00001840  20 94 28 4c 25 28 68 25  29 29 3e 32 37 20 8c 20  | .(L%(h%))>27 . |
00001850  6c 61 77 3d b9 0d 08 70  1c e7 20 94 28 4c 25 28  |law=...p.. .(L%(|
00001860  6a 25 29 29 3e 32 37 20  8c 20 6c 61 77 3d b9 20  |j%))>27 . law=. |
00001870  20 0d 08 7a 1b e7 20 94  28 4c 25 28 6b 25 29 29  | ..z.. .(L%(k%))|
00001880  3e 32 37 20 8c 20 6c 61  77 3d b9 20 0d 08 84 05  |>27 . law=. ....|
00001890  ed 0d 08 8e 05 e1 0d 08  98 58 dc 31 2c 32 2c 34  |.........X.1,2,4|
000018a0  2c 31 30 2c 33 2c 32 2c  36 2c 31 32 2c 37 2c 34  |,10,3,2,6,12,7,4|
000018b0  2c 38 2c 31 36 2c 39 2c  36 2c 38 2c 31 38 2c 31  |,8,16,9,6,8,18,1|
000018c0  39 2c 32 30 2c 32 32 2c  31 30 2c 32 31 2c 32 30  |9,20,22,10,21,20|
000018d0  2c 32 34 2c 31 32 2c 32  35 2c 32 32 2c 32 36 2c  |,24,12,25,22,26,|
000018e0  31 36 2c 32 37 2c 32 34  2c 32 36 2c 31 38 0d 08  |16,27,24,26,18..|
000018f0  a2 0b dd 20 f2 64 72 61  77 0d 08 ac 24 e3 20 63  |... .draw...$. c|
00001900  6f 75 6e 74 3d 30 b8 34  3a f2 74 75 6e 65 32 3a  |ount=0.4:.tune2:|
00001910  ed 3a f2 74 75 6e 65 33  28 32 30 30 29 0d 08 b6  |.:.tune3(200)...|
00001920  2e f1 27 27 c4 31 38 2c  bd 28 32 33 32 2b 50 25  |..''.18,.(232+P%|
00001930  29 2b 22 22 2b bd 28 32  33 32 2d 50 25 29 2b 22  |)+""+.(232-P%)+"|
00001940  22 29 3b 27 22 44 52 41  57 21 22 0d 08 c0 05 e1  |");'"DRAW!".....|
00001950  0d 08 ca 0c dd 20 f2 71  75 65 72 79 0d 08 d4 05  |..... .query....|
00001960  f1 0d 08 de 22 f1 22 44  6f 20 79 6f 75 20 20 20  |...."."Do you   |
00001970  77 61 6e 74 20 69 6e 73  2d 74 72 75 63 74 69 6f  |want ins-tructio|
00001980  6e 73 22 0d 08 e8 0d f1  22 3f 22 3a 51 24 3d be  |ns"....."?":Q$=.|
00001990  0d 08 f2 05 e1 0d 08 fc  09 dd f2 61 73 6b 0d 09  |...........ask..|
000019a0  06 1e ef 31 39 2c 30 2c  34 2c 30 2c 30 2c 30 2c  |...19,0,4,0,0,0,|
000019b0  31 39 2c 31 2c 33 2c 30  2c 30 2c 30 0d 09 10 59  |19,1,3,0,0,0...Y|
000019c0  f1 27 27 27 27 22 20 20  20 59 6f 75 20 68 61 76  |.''''"   You hav|
000019d0  65 20 61 20 63 68 6f 69  63 65 20 6f 66 20 66 69  |e a choice of fi|
000019e0  76 65 20 64 69 66 66 65  72 65 6e 74 20 20 20 20  |ve different    |
000019f0  20 67 61 6d 65 73 2c 77  68 69 63 68 20 77 65 20  | games,which we |
00001a00  73 68 61 6c 6c 20 6e 75  6d 62 65 72 20 31 20 74  |shall number 1 t|
00001a10  6f 20 35 2e 22 0d 09 1a  6f f1 27 27 22 20 31 20  |o 5."...o.''" 1 |
00001a20  54 68 69 73 20 69 73 20  74 68 65 20 6e 6f 76 69  |This is the novi|
00001a30  63 65 27 73 20 67 61 6d  65 2c 70 6c 61 79 65 64  |ce's game,played|
00001a40  20 20 20 20 20 20 20 20  6f 6e 20 74 68 65 20 77  |        on the w|
00001a50  68 69 74 65 20 73 71 75  61 72 65 73 20 6f 6e 6c  |hite squares onl|
00001a60  79 2c 61 6e 64 20 69 6e  20 20 20 20 20 20 20 20  |y,and in        |
00001a70  74 77 6f 20 64 69 6d 65  6e 73 69 6f 6e 73 2e 22  |two dimensions."|
00001a80  20 20 20 20 0d 09 24 47  f1 27 22 20 32 20 49 6e  |    ..$G.'" 2 In|
00001a90  20 74 68 72 65 65 20 64  69 6d 65 6e 73 69 6f 6e  | three dimension|
00001aa0  73 3b 74 68 65 20 66 69  72 73 74 20 70 6c 61 79  |s;the first play|
00001ab0  65 72 20 20 20 20 74 6f  20 67 65 74 20 61 20 72  |er    to get a r|
00001ac0  6f 77 20 77 69 6e 73 2e  22 20 20 0d 09 2e 49 f1  |ow wins."  ...I.|
00001ad0  27 22 20 33 20 49 6e 20  74 68 72 65 65 20 64 69  |'" 3 In three di|
00001ae0  6d 65 6e 73 69 6f 6e 73  3b 74 68 65 20 66 69 72  |mensions;the fir|
00001af0  73 74 20 70 6c 61 79 65  72 20 20 20 20 74 6f 20  |st player    to |
00001b00  67 65 74 20 54 57 4f 20  72 6f 77 73 20 77 69 6e  |get TWO rows win|
00001b10  73 2e 22 20 0d 09 38 6a  f1 27 22 20 34 20 53 69  |s." ..8j.'" 4 Si|
00001b20  6d 69 6c 61 72 20 74 6f  20 27 33 27 2c 62 75 74  |milar to '3',but|
00001b30  20 74 68 65 20 70 6c 61  79 65 72 20 77 68 6f 20  | the player who |
00001b40  20 20 20 20 20 20 6d 61  6b 65 73 20 74 68 65 20  |      makes the |
00001b50  53 45 43 4f 4e 44 20 72  6f 77 20 68 61 73 20 61  |SECOND row has a|
00001b60  6e 20 20 20 20 20 20 20  20 20 20 20 20 20 65 78  |n             ex|
00001b70  74 72 61 20 74 75 72 6e  2e 22 20 20 20 20 0d 09  |tra turn."    ..|
00001b80  42 6c f1 27 22 20 35 20  45 61 63 68 20 70 6c 61  |Bl.'" 5 Each pla|
00001b90  79 65 72 20 74 61 6b 65  73 20 74 75 72 6e 73 20  |yer takes turns |
00001ba0  75 6e 74 69 6c 20 74 68  65 20 20 20 20 20 20 20  |until the       |
00001bb0  63 75 62 65 20 69 73 20  66 75 6c 6c 2e 54 68 65  |cube is full.The|
00001bc0  20 77 69 6e 6e 65 72 20  69 73 20 74 68 65 20 6f  | winner is the o|
00001bd0  6e 65 20 20 20 20 20 20  77 69 74 68 20 6d 6f 73  |ne      with mos|
00001be0  74 20 72 6f 77 73 2e 22  20 20 0d 09 4c 22 f1 27  |t rows."  ..L".'|
00001bf0  27 22 20 20 20 43 68 6f  6f 73 65 20 79 6f 75 72  |'"   Choose your|
00001c00  20 67 61 6d 65 21 22 27  27 27 27 27 0d 09 56 2b  | game!"'''''..V+|
00001c10  e8 20 8a 32 33 2c 32 37  29 2c 67 61 6d 65 3a e7  |. .23,27),game:.|
00001c20  20 67 61 6d 65 3e 35 20  84 20 67 61 6d 65 3c 31  | game>5 . game<1|
00001c30  20 8c 20 8d 54 50 49 0d  09 60 13 d4 20 31 2c 34  | . .TPI..`.. 1,4|
00001c40  2c 67 61 6d 65 2a 34 35  2c 32 0d 09 6a 1b e7 20  |,game*45,2..j.. |
00001c50  67 61 6d 65 3d 31 20 8c  20 48 25 3d 39 20 8b 20  |game=1 . H%=9 . |
00001c60  48 25 3d 32 37 0d 09 74  29 e7 20 67 61 6d 65 3d  |H%=27..t). game=|
00001c70  31 20 8c 20 51 24 3d 22  45 22 3a 4f 24 3d 51 24  |1 . Q$="E":O$=Q$|
00001c80  3a 58 24 3d 51 24 3a 6d  61 78 3d 39 3a e1 0d 09  |:X$=Q$:max=9:...|
00001c90  7e 20 db 3a ef 31 39 2c  31 2c 30 2c 30 2c 30 2c  |~ .:.19,1,0,0,0,|
00001ca0  30 2c 31 39 2c 30 2c 35  2c 30 2c 30 2c 30 0d 09  |0,19,0,5,0,0,0..|
00001cb0  88 08 f1 20 27 27 0d 09  92 13 e7 20 67 61 6d 65  |... ''..... game|
00001cc0  3c 33 20 8c 20 8d 74 70  49 0d 09 9c ad f1 27 27  |<3 . .tpI.....''|
00001cd0  27 22 20 20 20 42 79 20  74 68 65 20 77 61 79 2c  |'"   By the way,|
00001ce0  75 6e 6c 65 73 73 20 79  6f 75 20 61 72 65 20 70  |unless you are p|
00001cf0  6c 61 79 69 6e 67 20 20  20 20 20 20 20 67 61 6d  |laying       gam|
00001d00  65 20 35 2c 74 68 65 72  65 20 69 73 20 6e 6f 20  |e 5,there is no |
00001d10  70 6f 69 6e 74 20 69 6e  20 66 69 6e 69 73 68 69  |point in finishi|
00001d20  6e 67 20 20 20 74 77 6f  28 6f 72 20 6d 6f 72 65  |ng   two(or more|
00001d30  29 20 72 6f 77 73 20 69  6e 20 74 68 65 20 73 61  |) rows in the sa|
00001d40  6d 65 20 67 6f 2c 20 20  20 20 20 20 20 61 73 20  |me go,       as |
00001d50  6f 6e 6c 79 20 6f 6e 65  20 6f 66 20 74 68 65 6d  |only one of them|
00001d60  20 77 69 6c 6c 20 63 6f  75 6e 74 21 22 20 20 20  | will count!"   |
00001d70  20 20 20 20 20 20 0d 09  a6 0c f2 57 41 49 54 28  |      .....WAIT(|
00001d80  33 29 0d 09 b0 11 ef 31  39 2c 30 2c 36 2c 30 2c  |3).....19,0,6,0,|
00001d90  30 2c 30 0d 09 ba 69 f1  27 27 22 20 20 20 20 54  |0,0...i.''"    T|
00001da0  68 65 72 65 20 61 72 65  20 74 68 72 65 65 20 6c  |here are three l|
00001db0  65 76 65 6c 73 20 6f 66  20 73 6b 69 6c 6c 20 74  |evels of skill t|
00001dc0  6f 20 20 20 20 20 20 63  68 6f 6f 73 65 20 66 72  |o      choose fr|
00001dd0  6f 6d 3a 2d 22 3a f1 27  22 20 45 20 3d 45 61 73  |om:-":.'" E =Eas|
00001de0  79 3a 41 6c 6c 20 62 6f  78 65 73 20 61 72 65 20  |y:All boxes are |
00001df0  76 61 6c 69 64 3b 22 20  20 20 20 20 0d 09 c4 3c  |valid;"     ...<|
00001e00  f1 27 22 20 4d 20 3d 4d  65 64 69 75 6d 3a 54 68  |.'" M =Medium:Th|
00001e10  65 20 63 65 6e 74 72 65  20 62 6f 78 2c 47 32 42  |e centre box,G2B|
00001e20  2c 69 73 20 6f 75 74 20  6f 66 20 20 20 20 20 62  |,is out of     b|
00001e30  6f 75 6e 64 73 3b 22 20  0d 09 ce b8 f1 27 22 20  |ounds;" .....'" |
00001e40  44 20 3d 44 69 66 66 69  63 75 6c 74 3a 4e 6f 74  |D =Difficult:Not|
00001e50  20 6f 6e 6c 79 20 69 73  20 74 68 65 20 63 65 6e  | only is the cen|
00001e60  74 72 65 20 62 6f 78 20  20 20 20 6f 75 74 20 6f  |tre box    out o|
00001e70  66 20 62 6f 75 6e 64 73  2c 62 75 74 20 73 6f 20  |f bounds,but so |
00001e80  61 6c 73 6f 20 69 73 20  65 61 63 68 20 6f 66 20  |also is each of |
00001e90  20 20 20 74 68 65 20 65  69 67 68 74 20 63 6f 72  |   the eight cor|
00001ea0  6e 65 72 20 62 6f 78 65  73 20 75 6e 74 69 6c 20  |ner boxes until |
00001eb0  6f 6e 65 20 6f 66 20 20  20 20 20 74 68 65 20 74  |one of     the t|
00001ec0  68 72 65 65 20 61 64 6a  61 63 65 6e 74 20 20 45  |hree adjacent  E|
00001ed0  44 47 45 20 62 6f 78 65  73 20 69 73 20 20 20 20  |DGE boxes is    |
00001ee0  20 20 20 6f 63 63 75 70  69 65 64 21 22 20 20 20  |   occupied!"   |
00001ef0  0d 09 e2 37 f1 27 27 3a  e8 22 20 20 20 20 53 6b  |...7.'':."    Sk|
00001f00  69 6c 6c 20 6c 65 76 65  6c 20 66 6f 72 20 66 69  |ill level for fi|
00001f10  72 73 74 20 70 6c 61 79  65 72 22 2c 51 24 20 20  |rst player",Q$  |
00001f20  20 20 20 20 20 20 20 0d  09 ec 0a 4f 24 3d 22 45  |       ....O$="E|
00001f30  22 0d 09 f6 1e e7 20 51  24 3d 22 4d 22 20 84 20  |"..... Q$="M" . |
00001f40  51 24 3d 22 6d 22 20 8c  20 4f 24 3d 22 4d 22 0d  |Q$="m" . O$="M".|
00001f50  0a 00 1e e7 20 51 24 3d  22 44 22 20 84 20 51 24  |.... Q$="D" . Q$|
00001f60  3d 22 64 22 20 8c 20 4f  24 3d 22 44 22 0d 0a 0a  |="d" . O$="D"...|
00001f70  33 f1 27 3a e8 22 20 20  20 20 53 6b 69 6c 6c 20  |3.':."    Skill |
00001f80  6c 65 76 65 6c 20 66 6f  72 20 73 65 63 6f 6e 64  |level for second|
00001f90  20 70 6c 61 79 65 72 22  2c 51 24 20 20 20 20 20  | player",Q$     |
00001fa0  0d 0a 14 0b 58 24 3d 22  45 22 20 0d 0a 1e 1e e7  |....X$="E" .....|
00001fb0  20 51 24 3d 22 4d 22 20  84 20 51 24 3d 22 6d 22  | Q$="M" . Q$="m"|
00001fc0  20 8c 20 58 24 3d 22 4d  22 0d 0a 28 1f e7 20 51  | . X$="M"..(.. Q|
00001fd0  24 3d 22 44 22 20 84 20  51 24 3d 22 64 22 20 8c  |$="D" . Q$="d" .|
00001fe0  20 58 24 3d 22 44 22 20  0d 0a 32 27 e7 20 58 24  | X$="D" ..2'. X$|
00001ff0  3d 22 45 22 20 80 20 4f  24 3d 22 45 22 20 8c 20  |="E" . O$="E" . |
00002000  6d 61 78 3d 32 37 20 8b  20 6d 61 78 3d 32 36 0d  |max=27 . max=26.|
00002010  0a 3c 05 e1 0d 0a 46 0d  dd f2 68 6f 77 6d 61 6e  |.<....F...howman|
00002020  79 0d 0a 50 1c 73 74 61  74 75 73 3d 73 74 61 74  |y..P.status=stat|
00002030  75 73 2b 50 25 2b 34 3a  65 6e 64 3d a3 0d 0a 5a  |us+P%+4:end=...Z|
00002040  27 e7 20 73 74 61 74 75  73 3d 33 30 52 20 73 74  |'. status=30R st|
00002050  61 74 75 73 3d 35 20 8c  20 8d 44 64 4a 20 8b 20  |atus=5 . .DdJ . |
00002060  8d 44 6e 4a 0d 0a 64 1c  e7 20 67 61 6d 65 20 3c  |.DnJ..d.. game <|
00002070  33 20 8c 20 f2 77 69 6e  3a 65 6e 64 3d b9 3a e1  |3 . .win:end=.:.|
00002080  0d 0a 6e 22 e7 20 73 74  61 74 75 73 3d 38 20 80  |..n". status=8 .|
00002090  20 67 61 6d 65 3d 34 20  8c 20 50 25 3d 50 25 2a  | game=4 . P%=P%*|
000020a0  2d 31 0d 0a 78 2b 20 e7  20 73 74 61 74 75 73 3d  |-1..x+ . status=|
000020b0  36 20 84 20 73 74 61 74  75 73 3e 39 20 8c 20 f2  |6 . status>9 . .|
000020c0  77 69 6e 3a 65 6e 64 3d  b9 3a e1 20 20 0d 0a 82  |win:end=.:.  ...|
000020d0  05 e1 0d 0a 8c 13 dd f2  74 75 6e 65 31 28 65 6e  |........tune1(en|
000020e0  25 2c 75 25 29 0d 0a 96  22 d4 33 2c 65 6e 25 2c  |%,u%)...".3,en%,|
000020f0  75 25 2a 38 2b 31 36 2c  34 3a d4 32 2c 65 6e 25  |u%*8+16,4:.2,en%|
00002100  2c 75 25 2a 38 2c 34 0d  0a a0 0e f2 57 41 49 54  |,u%*8,4.....WAIT|
00002110  28 30 2e 34 29 0d 0a aa  0b 2a 46 58 31 35 2c 30  |(0.4)....*FX15,0|
00002120  0d 0a b4 07 e1 20 20 0d  0a be 0b dd f2 74 75 6e  |.....  ......tun|
00002130  65 32 0d 0a c8 0f d4 26  31 30 2c 32 2c 36 2c 36  |e2.....&10,2,6,6|
00002140  30 0d 0a d2 10 f2 57 41  49 54 28 30 2e 34 29 20  |0.....WAIT(0.4) |
00002150  20 0d 0a dc 14 2a 46 58  31 35 2c 30 20 20 20 20  | ....*FX15,0    |
00002160  20 20 20 20 20 0d 0a e6  07 e1 20 20 0d 0a f0 12  |     .....  ....|
00002170  dd f2 74 75 6e 65 33 28  63 6f 75 6e 74 29 0d 0a  |..tune3(count)..|
00002180  fa 12 e3 20 63 25 3d 31  20 b8 20 63 6f 75 6e 74  |... c%=1 . count|
00002190  0d 0b 04 1d d4 20 26 31  31 2c b3 28 34 29 2c b3  |..... &11,.(4),.|
000021a0  28 31 35 30 29 2b 35 30  2c b3 28 33 29 0d 0b 0e  |(150)+50,.(3)...|
000021b0  05 ed 0d 0b 18 15 f2 57  41 49 54 28 30 2e 34 29  |.......WAIT(0.4)|
000021c0  20 20 20 20 20 20 20 0d  0b 22 0d 2a 46 58 31 35  |       ..".*FX15|
000021d0  2c 30 20 20 0d 0b 2c 08  e1 20 20 20 0d 0b 36 09  |,0  ..,..   ..6.|
000021e0  dd f2 77 68 6f 0d 0b 40  1e ef 31 39 2c 30 2c 32  |..who..@..19,0,2|
000021f0  2c 30 2c 30 2c 30 2c 31  39 2c 31 2c 30 2c 30 2c  |,0,0,0,19,1,0,0,|
00002200  30 2c 30 0d 0b 4a 41 f1  27 27 27 27 27 22 20 54  |0,0..JA.'''''" T|
00002210  68 65 20 67 61 6d 65 20  63 61 6e 20 62 65 20 70  |he game can be p|
00002220  6c 61 79 65 64 20 62 79  20 70 65 6f 70 6c 65 20  |layed by people |
00002230  6f 72 20 20 20 20 20 63  6f 6d 70 75 74 65 72 73  |or     computers|
00002240  21 22 20 20 0d 0b 54 42  f1 27 27 27 22 20 50 6c  |!"  ..TB.'''" Pl|
00002250  65 61 73 65 20 65 6e 74  65 72 20 74 68 65 20 70  |ease enter the p|
00002260  6c 61 79 65 72 73 27 20  6e 61 6d 65 73 2e 22 3a  |layers' names.":|
00002270  f1 20 22 20 28 43 20 3d  20 43 4f 4d 50 55 54 45  |. " (C = COMPUTE|
00002280  52 21 29 22 20 20 0d 0b  5e 1c f1 27 27 3a e8 22  |R!)"  ..^..'':."|
00002290  20 46 69 72 73 74 20 70  6c 61 79 65 72 22 2c 6e  | First player",n|
000022a0  31 24 0d 0b 68 1e f1 27  27 3a e8 22 20 53 65 63  |1$..h..'':." Sec|
000022b0  6f 6e 64 20 20 70 6c 61  79 65 72 22 2c 6e 32 24  |ond  player",n2$|
000022c0  0d 0b 72 0c f2 57 41 49  54 28 31 29 0d 0b 7c 0c  |..r..WAIT(1)..|.|
000022d0  e1 20 20 20 20 20 20 20  0d 0b 86 83 dc 31 2c 37  |.       .....1,7|
000022e0  2c 32 2c 34 2c 33 2c 37  2c 34 2c 34 2c 35 2c 35  |,2,4,3,7,4,4,5,5|
000022f0  2c 36 2c 34 2c 37 2c 37  2c 38 2c 34 2c 39 2c 37  |,6,4,7,7,8,4,9,7|
00002300  2c 31 30 2c 34 2c 31 31  2c 35 2c 31 32 2c 34 2c  |,10,4,11,5,12,4,|
00002310  31 33 2c 35 2c 31 34 2c  31 33 2c 31 35 2c 35 2c  |13,5,14,13,15,5,|
00002320  31 36 2c 34 2c 31 37 2c  35 2c 31 38 2c 34 2c 31  |16,4,17,5,18,4,1|
00002330  39 2c 37 2c 32 30 2c 34  2c 32 31 2c 37 2c 32 32  |9,7,20,4,21,7,22|
00002340  2c 34 2c 32 33 2c 35 2c  32 34 2c 34 2c 32 35 2c  |,4,23,5,24,4,25,|
00002350  37 2c 32 36 2c 34 2c 32  37 2c 37 0d 0b 90 0c dd  |7,26,4,27,7.....|
00002360  f2 62 65 65 62 67 6f 0d  0b 9a 34 fb 32 3a f1 27  |.beebgo...4.2:.'|
00002370  22 54 68 69 6e 6b 69 6e  67 2e 2e 2e 2e 22 3a ef  |"Thinking....":.|
00002380  31 37 2c 33 2c 31 31 2c  31 31 2c 31 39 2c 30 2c  |17,3,11,11,19,0,|
00002390  34 2c 30 2c 30 2c 30 20  20 20 20 0d 0b a4 18 e3  |4,0,0,0    .....|
000023a0  20 47 25 3d 31 20 b8 20  48 25 3a 41 25 28 47 25  | G%=1 . H%:A%(G%|
000023b0  29 3d 30 0d 0b ae 1a e7  20 94 20 28 4c 25 28 47  |)=0..... . (L%(G|
000023c0  25 29 29 3e 32 37 20 8c  20 8d 54 60 4d 0d 0b b8  |%))>27 . .T`M...|
000023d0  25 f2 6c 65 67 61 6c 28  47 25 29 3a e7 20 47 25  |%.legal(G%):. G%|
000023e0  3d 31 34 20 80 20 6c 61  77 3d a3 20 8c 20 8d 54  |=14 . law=. . .T|
000023f0  60 4d 0d 0b c2 12 e7 20  6c 61 77 3d a3 20 8c 20  |`M..... law=. . |
00002400  8d 54 56 4d 0d 0b cc 2c  f2 73 68 6f 77 28 47 25  |.TVM...,.show(G%|
00002410  2c 32 34 32 2b 50 25 29  3a e7 20 47 25 83 20 32  |,242+P%):. G%. 2|
00002420  3d 30 20 8c 20 46 25 3d  32 20 8b 20 46 25 3d 31  |=0 . F%=2 . F%=1|
00002430  0d 0b d6 0a f7 20 8d 74  46 4b 0d 0b e0 1b f5 3a  |..... .tFK.....:|
00002440  f3 20 73 71 75 25 2c 6d  72 6b 25 3a fd 20 73 71  |. squ%,mrk%:. sq|
00002450  75 25 3d 47 25 0d 0b ea  30 41 25 28 47 25 29 3d  |u%=G%...0A%(G%)=|
00002460  6d 72 6b 25 2b 34 30 30  3a e7 20 67 61 6d 65 3d  |mrk%+400:. game=|
00002470  31 20 80 20 47 25 3d 35  20 8c 20 41 25 28 35 29  |1 . G%=5 . A%(5)|
00002480  3d 34 31 38 20 0d 0b f4  16 e3 20 64 25 3d 46 25  |=418 ..... d%=F%|
00002490  20 b8 20 47 25 2d 32 20  88 20 32 0d 0b fe 12 e7  | . G%-2 . 2.....|
000024a0  20 64 25 3d 47 25 20 8c  20 8d 44 44 4c 0d 0c 08  | d%=G% . .DDL...|
000024b0  13 e7 20 64 25 3c 3e 31  34 20 8c 20 8d 54 5c 4c  |.. d%<>14 . .T\L|
000024c0  0d 0c 12 20 e7 20 ac 20  28 58 24 3d 22 45 22 20  |... . . (X$="E" |
000024d0  84 20 4f 24 3d 22 45 22  29 20 8c 20 8d 44 44 4c  |. O$="E") . .DDL|
000024e0  0d 0c 1c 10 65 25 3d 28  47 25 2b 64 25 29 2f 32  |....e%=(G%+d%)/2|
000024f0  0d 0c 26 13 e7 20 65 25  3c 3e 31 34 20 8c 20 8d  |..&.. e%<>14 . .|
00002500  54 7a 4c 0d 0c 30 1e e7  20 ac 28 58 24 3d 22 45  |TzL..0.. .(X$="E|
00002510  22 20 84 20 4f 24 3d 22  45 22 29 8c 20 8d 44 44  |" . O$="E"). .DD|
00002520  4c 0d 0c 3a 2a e7 20 a4  56 28 65 25 29 2d a4 56  |L..:*. .V(e%)-.V|
00002530  28 64 25 29 3d a4 56 28  47 25 29 2d a4 56 28 65  |(d%)=.V(G%)-.V(e|
00002540  25 29 20 8c 20 f2 61 77  61 72 64 0d 0c 44 05 ed  |%) . .award..D..|
00002550  0d 0c 4e 11 e3 20 64 25  3d 31 20 b8 20 47 25 2d  |..N.. d%=1 . G%-|
00002560  31 0d 0c 58 12 e7 20 64  25 3d 47 25 20 8c 20 8d  |1..X.. d%=G% . .|
00002570  74 68 4c 0d 0c 62 13 e7  20 64 25 3c 3e 31 34 20  |thL..b.. d%<>14 |
00002580  8c 20 8d 44 76 4c 0d 0c  6c 1f e7 20 ac 28 58 24  |. .DvL..l.. .(X$|
00002590  3d 22 45 22 20 84 20 4f  24 3d 22 45 22 29 20 8c  |="E" . O$="E") .|
000025a0  20 8d 74 68 4c 0d 0c 76  0e 65 25 3d 32 2a 47 25  | .thL..v.e%=2*G%|
000025b0  2d 64 25 0d 0c 80 12 e7  20 65 25 3e 48 25 20 8c  |-d%..... e%>H% .|
000025c0  20 8d 74 68 4c 0d 0c 8a  13 e7 20 65 25 3c 3e 31  | .thL..... e%<>1|
000025d0  34 20 8c 20 8d 74 5e 4c  0d 0c 94 1f e7 20 ac 28  |4 . .t^L..... .(|
000025e0  58 24 3d 22 45 22 20 84  20 4f 24 3d 22 45 22 29  |X$="E" . O$="E")|
000025f0  20 8c 20 8d 74 68 4c 0d  0c 9e 2b e7 20 a4 56 28  | . .thL...+. .V(|
00002600  47 25 29 2d a4 56 28 64  25 29 3d a4 56 28 65 25  |G%)-.V(d%)=.V(e%|
00002610  29 2d a4 56 28 47 25 29  20 8c 20 f2 61 77 61 72  |)-.V(G%) . .awar|
00002620  64 20 0d 0c a8 05 ed 0d  0c b2 12 e3 20 64 25 3d  |d .......... d%=|
00002630  47 25 2b 31 20 b8 20 48  25 0d 0c bc 13 e7 20 64  |G%+1 . H%..... d|
00002640  25 3e 3d 48 25 20 8c 20  8d 54 4c 4d 0d 0c c6 13  |%>=H% . .TLM....|
00002650  e7 20 64 25 3c 3e 31 34  20 8c 20 8d 64 5a 4c 0d  |. d%<>14 . .dZL.|
00002660  0c d0 1f e7 20 ac 28 58  24 3d 22 45 22 20 84 20  |.... .(X$="E" . |
00002670  4f 24 3d 22 45 22 29 20  8c 20 8d 54 4c 4d 0d 0c  |O$="E") . .TLM..|
00002680  da 0e 65 25 3d 32 2a 64  25 2d 47 25 0d 0c e4 12  |..e%=2*d%-G%....|
00002690  e7 20 65 25 3e 48 25 20  8c 20 8d 54 4c 4d 0d 0c  |. e%>H% . .TLM..|
000026a0  ee 13 e7 20 65 25 3c 3e  31 34 20 8c 20 8d 54 42  |... e%<>14 . .TB|
000026b0  4d 0d 0c f8 1f e7 20 ac  28 58 24 3d 22 45 22 20  |M..... .(X$="E" |
000026c0  84 20 4f 24 3d 22 45 22  29 20 8c 20 8d 54 4c 4d  |. O$="E") . .TLM|
000026d0  0d 0d 02 2b e7 20 a4 56  28 65 25 29 2d a4 56 28  |...+. .V(e%)-.V(|
000026e0  64 25 29 3d a4 56 28 64  25 29 2d a4 56 28 47 25  |d%)=.V(d%)-.V(G%|
000026f0  29 20 8c 20 f2 61 77 61  72 64 20 0d 0d 0c 05 ed  |) . .award .....|
00002700  0d 0d 16 11 f2 73 68 6f  77 28 47 25 2c 32 33 30  |.....show(G%,230|
00002710  29 0d 0d 20 05 ed 0d 0d  2a 11 ef 31 39 2c 30 2c  |).. ....*..19,0,|
00002720  30 2c 30 2c 30 2c 30 0d  0d 34 1e 73 74 61 72 74  |0,0,0,0..4.start|
00002730  25 3d 32 2b b3 28 48 25  2d 34 29 3a 62 25 3d 30  |%=2+.(H%-4):b%=0|
00002740  3a 73 25 3d 30 0d 0d 3e  20 e3 20 67 25 3d 73 74  |:s%=0..> . g%=st|
00002750  61 72 74 25 20 b8 20 48  25 3a f2 62 65 73 74 6d  |art% . H%:.bestm|
00002760  6f 76 65 3a ed 0d 0d 48  24 e3 20 67 25 3d 31 20  |ove:...H$. g%=1 |
00002770  b8 20 28 73 74 61 72 74  25 2d 31 29 3a f2 62 65  |. (start%-1):.be|
00002780  73 74 6d 6f 76 65 3a ed  20 0d 0d 52 05 e1 0d 0d  |stmove:. ..R....|
00002790  5c 2c dd f2 62 65 73 74  6d 6f 76 65 3a e7 20 41  |\,..bestmove:. A|
000027a0  25 28 67 25 29 3e 62 25  20 8c 20 73 25 3d 67 25  |%(g%)>b% . s%=g%|
000027b0  3a 62 25 3d 41 25 28 67  25 29 0d 0d 66 05 e1 0d  |:b%=A%(g%)..f...|
000027c0  0d 70 0b dd f2 61 77 61  72 64 0d 0d 7a 23 4a 25  |.p...award..z#J%|
000027d0  3d 4c 25 28 65 25 29 81  34 30 30 2a 34 2b 4c 25  |=L%(e%).400*4+L%|
000027e0  28 64 25 29 81 34 30 30  2a 34 2b 50 25 0d 0d 84  |(d%).400*4+P%...|
000027f0  28 e7 20 94 28 4a 25 29  3d 39 20 80 20 67 61 6d  |(. .(J%)=9 . gam|
00002800  65 3d 34 20 80 20 73 74  61 74 75 73 3d 30 20 8c  |e=4 . status=0 .|
00002810  20 4a 25 3d 31 0d 0d 8e  0a f7 20 8d 64 5e 4d 0d  | J%=1..... .d^M.|
00002820  0d 98 2b e7 20 94 28 4a  25 29 3d 37 20 80 20 67  |..+. .(J%)=7 . g|
00002830  61 6d 65 3d 35 20 8c 20  41 25 28 47 25 29 3d 41  |ame=5 . A%(G%)=A|
00002840  25 28 47 25 29 2b 36 35  3a e1 0d 0d a2 18 f5 3a  |%(G%)+65:......:|
00002850  f3 20 4b 25 2c 4d 25 3a  fd 20 4b 25 3d 94 28 4a  |. K%,M%:. K%=.(J|
00002860  25 29 0d 0d ac 14 41 25  28 47 25 29 3d 41 25 28  |%)....A%(G%)=A%(|
00002870  47 25 29 2b 4d 25 0d 0d  b6 17 d4 31 2c 2d 28 4a  |G%)+M%.....1,-(J|
00002880  25 2b 33 29 2f 32 2c 47  25 2a 38 2c 31 0d 0d c0  |%+3)/2,G%*8,1...|
00002890  0b 2a 46 58 31 35 2c 31  0d 0d ca 2f e7 20 94 28  |.*FX15,1.../. .(|
000028a0  4a 25 29 3d 31 20 80 20  94 28 4c 25 28 64 25 29  |J%)=1 . .(L%(d%)|
000028b0  29 3e 32 38 20 8c 20 41  25 28 47 25 29 3d 41 25  |)>28 . A%(G%)=A%|
000028c0  28 47 25 29 2d 35 30 0d  0d d4 05 e1 0d 0d de 21  |(G%)-50........!|
000028d0  dc 20 31 2c 31 30 2c 33  2c 32 30 2c 35 2c 34 30  |. 1,10,3,20,5,40|
000028e0  2c 37 2c 34 30 30 2c 39  2c 34 30 30 30 0d 0d e8  |,7,400,9,4000...|
000028f0  0c dd f2 66 69 76 65 6e  64 0d 0d f2 0e ea 20 4a  |...fivend..... J|
00002900  25 2c 4b 25 2c 4d 25 0d  0d fc 13 db 3a ef 31 39  |%,K%,M%.....:.19|
00002910  2c 30 2c 31 2c 30 2c 30  2c 30 0d 0e 06 0d 6e 74  |,0,1,0,0,0....nt|
00002920  3d 30 3a 63 72 3d 30 0d  0e 10 0a f2 70 72 69 6e  |=0:cr=0.....prin|
00002930  74 0d 0e 1a 11 e3 20 4a  25 3d 31 20 b8 20 48 25  |t..... J%=1 . H%|
00002940  2d 32 0d 0e 24 14 e3 20  4b 25 3d 4a 25 2b 31 20  |-2..$.. K%=J%+1 |
00002950  b8 20 48 25 2d 31 0d 0e  2e 0e 4d 25 3d 32 2a 4b  |. H%-1....M%=2*K|
00002960  25 2d 4a 25 0d 0e 38 12  e7 20 4d 25 3e 48 25 20  |%-J%..8.. M%>H% |
00002970  8c 20 8d 44 7e 4e 0d 0e  42 29 e7 20 4c 25 28 4b  |. .D~N..B). L%(K|
00002980  25 29 2d 4c 25 28 4a 25  29 3c 3e 4c 25 28 4d 25  |%)-L%(J%)<>L%(M%|
00002990  29 2d 4c 25 28 4b 25 29  20 8c 20 8d 44 7e 4e 0d  |)-L%(K%) . .D~N.|
000029a0  0e 4c 32 f2 73 68 6f 77  28 4a 25 2c 32 33 30 29  |.L2.show(J%,230)|
000029b0  3a f2 73 68 6f 77 28 4b  25 2c 32 33 30 29 3a f2  |:.show(K%,230):.|
000029c0  73 68 6f 77 28 4d 25 2c  32 33 30 29 20 20 20 20  |show(M%,230)    |
000029d0  20 0d 0e 56 13 f2 57 41  49 54 28 2e 35 29 20 20  | ..V..WAIT(.5)  |
000029e0  20 20 20 20 0d 0e 60 4d  e7 20 4c 25 28 4b 25 29  |    ..`M. L%(K%)|
000029f0  3c 30 20 8c 20 6e 74 3d  6e 74 2b 31 3a f2 70 72  |<0 . nt=nt+1:.pr|
00002a00  69 6e 74 3a f2 73 68 6f  77 28 4b 25 2c 32 33 31  |int:.show(K%,231|
00002a10  29 3a f2 73 68 6f 77 28  4a 25 2c 32 33 31 29 3a  |):.show(J%,231):|
00002a20  f2 73 68 6f 77 28 4d 25  2c 32 33 31 29 20 20 20  |.show(M%,231)   |
00002a30  20 0d 0e 6a 4d e7 20 4c  25 28 4b 25 29 3e 32 38  | ..jM. L%(K%)>28|
00002a40  20 8c 20 63 72 3d 63 72  2b 31 3a f2 70 72 69 6e  | . cr=cr+1:.prin|
00002a50  74 3a f2 73 68 6f 77 28  4a 25 2c 32 33 33 29 3a  |t:.show(J%,233):|
00002a60  f2 73 68 6f 77 28 4b 25  2c 32 33 33 29 3a f2 73  |.show(K%,233):.s|
00002a70  68 6f 77 28 4d 25 2c 32  33 33 29 20 20 20 0d 0e  |how(M%,233)   ..|
00002a80  74 13 f2 57 41 49 54 28  2e 35 29 20 20 20 20 20  |t..WAIT(.5)     |
00002a90  20 0d 0e 7e 06 ed 20 0d  0e 88 06 ed 20 0d 0e 92  | ..~.. ..... ...|
00002aa0  13 ef 31 39 2c 30 2c 30  2c 30 2c 30 2c 30 20 20  |..19,0,0,0,0,0  |
00002ab0  0d 0e 9c 07 e1 20 20 0d  0e a6 0d dd f2 70 72 69  |.....  ......pri|
00002ac0  6e 74 20 20 0d 0e b0 06  db 20 0d 0e ba 11 f1 3b  |nt  ..... .....;|
00002ad0  22 43 6f 75 6e 74 69 6e  67 22 20 0d 0e c4 1d ef  |"Counting" .....|
00002ae0  33 31 2c 31 2c 34 2c 32  33 31 2c 33 31 2c 31 2c  |31,1,4,231,31,1,|
00002af0  36 2c 32 33 33 20 20 20  0d 0e ce 17 f1 8a 34 2c  |6,233   ......4,|
00002b00  34 29 3b 6e 74 3b 8a 34  2c 36 29 3b 63 72 20 0d  |4);nt;.4,6);cr .|
00002b10  0e d8 06 20 e1 0d ff                              |... ...|
00002b17
OXO.m0
OXO.m1
OXO.m2
OXO.m4
OXO.m5