BUSTRUN IdIKd 31599o{ n""BUSTCODE"31600p{,352` x"Codebuster" BUSTCODE `p{ b}}ͫ{2y{{2z{͋{:t{G*p{[r{~w#>:t{G*p{[r{N ywy<#>:t{G2u{*p{[r{N ywy<x :t{G#:u{=2u{ :t{<<_*r{"r{c|͉| *p{:t{O"r{B"p{{{"p{"r{*p{:t{_+~>͋{CodebusterdNXCodebuster by Bruce Anderson from Your Sinclair #4 (Apr'86) d*********************** n* * x* Codebuster * * Bruce Anderson * * * ***********************  t=1:f=0 !att=22528X:mc=31600p{ ?nc=9 :nh=4:nh1=nh+1:sh=nh*2+4 1g1=32000}:gs=g1+nh:level=3:auto=t p0=g1:p1=mc:2260 mc+4,nh:mc+6,nc 2320 :Define UDG max=10 :colscn=f 6:1:4: H12 ,8;"Colour OR B&W":2230:a$="c"a$="C"colscn=t   Get option " ,(2:7::comp=f:a1=3 6mysc=0:cosc=0 @1,10 ;"CODEBUSTER";5,10 ;"1:Competition";6,10 ;"2:Set code";7,10 ;"3:Break code";8,10 ;"4:Level ";level Ja$="OFF":auto=ta$="ON" T9 ,10 ;"5:Holes ";nh;10 ,10 ;"6:Colours ";nc;11 ,10 ;"7:Target ";max;12 ,10 ;"8:Autoscore ";a$;13 ,10 ;"9:Quit" ^B2230:val=a$-480:val<1val>9 350^ hval*20+350^ r6comp=t:"Your name";n$:n$>6n$=n$(6) |!750:540:300, !750:890z:300, "750:1300:300, E"New level (0 TO 5) ";level:level<0level>5430  300, 8"Holes (2 TO 6) ";nh:nh<2nh>6450 Knh1=nh+1:sh=nh*2+4:gs=g1+nh:mc+4,nh:300, :"Colours (2 TO 9) ";nc:nc<2nc>9 470 mc+6,nc:300, "Target ";max:300, auto=auto:300,   890z:sco=score:Set code &1300:Break code 06sco=score-sco:sco>0cosc=cosc+sco:580D :mysc=mysc-sco DFmyscmax840H:21,5;"Victory is yours":610b NPcoscmax840H:21,5;"My CPU was just too strong":610b X 540 b!#1;"Hit any key":0 l v Set up board  comp=t840H !0:a=19a1-1 )a$=(20-a):a>10 a$="0"+a$ !7:a,2;a$:0 b=1nh &a,3+2*b;"";a,sh+b;"" b:a 87:a=1nh:1,a*2+3;a:a  4::7 u37%,13 :nh*24+6,0:0,140:-nh*24-6,0:0,-140 w35#,11 :nh*24+10 ,0:0,144:-nh*24-10 ,0:0,-144  237%+16*nh,13 :0,140 comp=f830>  a=attatt+31 * a,16 4a > H{2:6:0,0;"TARGET ";max;" Speccy ";cosc;" ";n$;" ";mysc;21,11 ;"CODEBUSTER":4 R \ fComputer's turn p z>660:m1=nc-1:sp=f:nc=9 m1=7:sp=t Sgo=19:g1=g1-nh:1720:m1=7:g1=g1+nh:p0=g1:p1=mc:2260 .lb=level+2:level=5lb=10 mc+7,lb  gc=gs:go=1  s1=(*nh1) 1200:980 (mc+169)  2010 'auto=tval=(mc+9 ):1020 #1;"Blacks"  2160p nb=val:(gc+nh),val (auto=tval=(mc+10 ):1070.  3438n #1;"Whites" $ 2160p .nw=val:(gc+nh1),val 8 3438n BUnb+nw>nhnbɾ(mc+9 )nwɾ(mc+10 )#1;"Error":100d:990 L1790:Print score Vnbnh1140t `'a1=20-go:score=go:go=19 j2090*:1190 t0gc=gc+nh+2:go=go+1:mc+8,go ~go2960 <p0=gc:p1=mc+2:2260:p0=g1:p1=mc:2260 *go>9 lb=lb+2:mc+7,lb  970  a=0nh-1 g1+a,s1:gc+a,s1 s1=s1+1 s1ncs1=0 a Op0=gc:p1=mc+2:2260:p0=g1-nh:p1=mc:2260:(mc+11 )    Break code   ,sp=t:m1=7:tt=gs:gc=g1:go=1 "p0=gs:p1=mc+2:2260 (p0=g1:p1=mc:2260 2660:Set up board 17#1;"You are awful":502:1410 xnbnh1350F 6score=go-1:a1=20-go:go=19:gc=gs  2090*    New guess  'a=0nh-1:g1+a,8:a b=att+3:pos=1 8x=b+(20-go)*32 +pos*2:x,x+128 2230:Get a$ Xa$=" "sp=tcolour=8:20-go,3+pos*2;0;" ":1680  colour=a$ colour>13 1610J x,x-128 colour=13 1710 colour=9 1690 "colour81490 ,pos=pos-2 6pos<1pos=pos+nh @ 1690 Jcolour=colour-480 T&colour<0colour>m11500 ^colscn=t1660| h220-go,3+pos*2;0;colour r 1680 |Kcolour=420-go,3+pos*2;7;"":1680 .20-go,3+pos*2;colour;"" g1+pos-1,colour &pos=pos+1:pos>nhpos=1  1490  1470:1730  1480 ,x=t:a=0nh-1:(g1+a)ncx=f a:x=f1725   Display score  nb=018400  0 a=1nb 20-go,sh+a;"" &a 0nw=01890b : 7 Da=1nw N20-go,sh+nb+a;"" Xa b l vOriginal guess   a=0nh-1 gs+a,(*nc) a    Print guess  a=0nh-1 5row=20-go:col=5+a*2:val=(gc+a) 0val=8row,col;0;" ":2070 -colscn=frow,col;0;val:2070 0val=4row,col;7;"":2070  row,col;val;"" a   * 3438n 4\2010:21,5;"That took ";score;" moves":#1;"Hit any key":0 >-3438n :21,5;25;"" H R \Get value<=nh AND >=0 f p 2230 zval=a$-480  val<0val>nh2160p   Get a character in a$  a$=:a$""2230 a$=:a$=""2240  (hi=(p0/256):lo=p0-256*hi p1,lo:p1+1,hi   UDGs  a=15:a$ b=07:val $ a$+b,val .b:a 8 B"a",60<,126~,255,255,255,255,126~,60<,"b",60<,66B,129,129,129,129,66B,60<,"c",0,60<,126~,126~,126~,126~,60<,0,"d",0,0,0,24,24,0,0,0,"e",0,0,24,60<,60<,24,0,0