dzn.basIS LogNø Micro CIS LogTEXTMACAˆ_ ¤è{¤è~1 cls 2 ?@90,"The Dozen Puzzle" 3 ?@128,"Created by G. Dunsay" 4 ?@171,"CIS #72325,614":for x = 1 to 1000: next x 5 cls 6 dim a(5,5), b(5), k(5) 7 randomize 8 z$=space$(19):i=0 50 print@5, "A B C D E":for x=20 to 220 step 40:?@x,z$;:next x 51 print@42,"F":?@82,"G":?@122,"H":?@162,"I":?@202,"J":?@282,"Turn #";i;" completed"; 60 for v=1 to 5:for h=1 to 5 62 if i<>0 then 63 else a(v,h)=int(rnd*99)+1 63 s=0:if a(v,h)<10 then ?@1+(v*40)+(h*3)," ":s=1 64 ?@1+s+(v*40)+(h*3),a(v,h) 66 next h:next v 70 w=0:for h=1 to 5:for v=1 to 5 72 if a(v,h)<>12 then w=1 74 next v:next h:if w=1 then 80 76 for x=1 to 5:beep:next x:for x=0 to 120 step 40:?@x,z$:next x 77 ?@80," YOU WON IN ";i;" TURNS !!" 78 end 80 ?@20,"Select row/column" 81 ?@60,"(A-J) - ":q$="" 82 ?@69,"";:gosub 200:?@69,q$ 83 if asc(q$)<65 then 85 84 if asc(q$)>74 then 85 else 88 85 beep:?@100,"Between A-J only!":beep 86 gosub 205 87 for x=20 to 100 step 40:?@x,z$:next x:goto 80 88 gosub 210 90 r$=q$:?@100,"Select a=Add, s=Sub" 91 ?@140,"m=Mult, d=Div " 92 ?@156,"":gosub 200 93 if q$="A" then m=1:v$="+":goto 100 94 if q$="S" then m=2:v$="-":goto 100 95 if q$="D" then m=3:v$="/":goto 100 96 if q$="M" then m=4:v$="*":goto 100 97 v$=q$:?@156,"(";v$;")":Beep:?@180,"Select a,s,m,d only" 98 gosub 205 99 for x=100 to 180 step 40:?@x,z$:next x:goto 90 100 ?@156,"(";v$;")" 101 ?@180,"Select amt. (1-9) ";:gosub 200 102 ?q$:n=val(q$):if asc(q$)<49 then 120 103 if asc(q$)>57 then 120 104 if v$="+" then goto 115 105 if v$="-" then goto 113 106 if v$="*" then goto 111 107 w=0:for x=1 to 5:k(x)=b(x)/n 108 if k(x)<>int(k(x))then w=1 109 next x:if w=1 then 125 else 150 111 w=0:for x=1 to 5:k(x)=n*b(x):if k(X)>99 then 123 112 next x:if w=1 then 123 else 150 113 w=0:for x=1 to 5:k(x)=b(x)-n:if k(x)<1 then w=1 114 next x:if w=1 then 125 else 150 115 w=0:for x=1 to 5:k(x)=b(x)+n:if k(x) > 99 then w=1 116 next x:if w=1 then 123 else 150 120 ?@220,"Between 1-9 only":gosub 205 121 for x=20 to 220 step 40:?@x,z$:next x:goto 80 123 ?@220,"Total over 100":gosub 205:goto 121 124 ?@220,"Total below 1":gosub 205:goto 121 125 ?@220,"Result is fraction":gosub 205:goto 121 150 if c>5 then 160 152 for x=1 to 5:a(x,c)=k(x):next x 154 i=i+1:goto 50 160 for x=1 to 5:a(c-5,x)=k(x):next x:goto 154 200 q$=inkey$ 201 if q$="" then 200 202 if asc(q$)>96 then q$=chr$(asc(q$)-32) 203 return 205 beep:for x=1 to 500:next x:beep:return 210 c=0:if q$="A" then c=1 211 if q$="B" then c=2 212 if q$="C" then c=3 213 if q$="D" then c=4 215 if q$="E" then c=5 216 if c=0 then 218 217 for x=1 to 5:b(x)=a(x,c):next x:return 218 if q$="F" then c=6 219 if q$="G" then c=7 220 if q$="H" then c=8 221 if q$="I" then c=9 222 if q$="J" then c=10 223 for x=1 to 5:b(x)=a(c-5,x):next x:return