home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1993 December / 1993-12.d64 / splast (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  5KB  |  154 lines

  1. 0 rem copyright 1993 - compute publications intl ltd -all rights reserved
  2. 10 rem splast by william f. snow
  3. 20 dimwd$(25),y(25),r$(25),ww$(25),rw$(25):for i=1 to 25:read wd$(i):next
  4. 30 a$=chr$(65):e$=chr$(69):i$=chr$(73):o$=chr$(79):u$=chr$(85):v=53248:sl=54272
  5. 40 fors=12288 to 12351:read sp:poke s,sp:next
  6. 50 fors=12352 to 12415:read sp:poke s,sp:next
  7. 60 poke53280,1:poke53281,13:print"[144][147]"spc(17)"splast[144]"
  8. 70 print:print"the object of splast[144] is to find the mispelled word";
  9. 80 print" and 'splast[144]' it off the  screen.";
  10. 90 print" you are given three words at a  time.";
  11. 100 print" two of them are spelled correctly and one is wrong.";
  12. 110 print" you must position";
  13. 120 print" your'splaster[144]' under the mispelled word     (using a joystick ";
  14. 130 print"in port two) and hit  the fire button.";
  15. 140 print:print"there are three levels.";
  16. 150 print"as the levelsincrease you are given";
  17. 160 print" less time to     find the incorrect word.
  18. 170 [153][166]9)"hit any key to begin
  19. 180 get ww$:if ww$=""then180
  20. 190 rc=1:input"[147]please enter your initials";in$
  21. 200 rc=1:print"what skill level ?"
  22. 210 print:printspc(10)"1) beginner":print:printspc(10)"2) average
  23. 220 [153]:[153][166]10)"3) expert
  24. 230 get pl$:ifpl$="1"orpl$="2"orpl$="3"then250
  25. 240 goto230
  26. 250 pl=val(pl$)
  27. 260 print"[147]"spc(14)"please  wait":print:printspc(12)"scrambling words"
  28. 270 poke2040,192:pokev+21,1:pokev+39,6
  29. 280 pokev,130:pokev+1,220
  30. 290 fori=1 to 25
  31. 300 x=int(rnd(.)*25)+1
  32. 310 forck=1 to 25:ifx=y(ck)then300
  33. 320 next ck:y(i)=x
  34. 330 r$(x)=wd$(i):nexti
  35. 340 ct=1
  36. 350 pokev+31,0:if ct>25 then920
  37. 360 es=0:xa=130:pokev,xa:gosub520
  38. 370 wg=int(rnd(.)*25)+1:wg$=r$(wg):ifwg$=r$(ct)then370
  39. 380 wh=int(rnd(.)*25)+1:wh$=r$(wh):ifwh$=wg$orwh$=r$(ct)then380
  40. 390 c=int(rnd(.)*3)+1:on c gosub770,780,790
  41. 400 if pl=1 then for fl=1to25:if es=1 then460
  42. 410 if pl=2 then for fl=1to20:if es=1 then460
  43. 420 if pl=3 then for fl=1to15:ifes=1 then460
  44. 430 ck=0:print"[147]"wo$(1)spc(4)wo$(2)spc(4)wo$(3)
  45. 440 cl=0:gosub680
  46. 450 if cl=1 then gosub870
  47. 460 nextfl
  48. 470 pokev+31,0:if ct>25 then920
  49. 480 if es=1 thenrw=rw+1:rw$(rw)=r$(ct):ww$(ct)=""
  50. 490 if es<>1 then gosub1330:ww=ww+1:ww$(ww)=r$(ct):rn=0
  51. 500 ct=ct+1
  52. 510 goto350
  53. 520 wl=len(r$(ct)):l=int(rnd(.)*wl+1):le$=mid$(r$(ct),l,1):le=asc(le$)
  54. 530 lt$=chr$(le)
  55. 540 iflt$=a$ or lt$=e$ or lt$=i$ or lt$=o$ or lt$=u$ then560
  56. 550 goto520
  57. 560 rv=int(rnd(.)*5)+1:onrv goto570,580,590,600,610
  58. 570 v$=a$:goto620
  59. 580 v$=e$:goto620
  60. 590 v$=i$:goto620
  61. 600 v$=o$:goto620
  62. 610 v$=u$
  63. 620 if v$=lt$ then560
  64. 630 rw$=left$(r$(ct),l-1)
  65. 640 rm=wl-(l):ifrm<1then520
  66. 650 lw$=right$(r$(ct),rm)
  67. 660 nw$=rw$+v$+lw$
  68. 670 return
  69. 680 jy=peek(56320)and15:fb=peek(56320)and16
  70. 690 if jy=7then xa=xa+10:if xa>250then xa=250
  71. 700 if jy=11 then xa=xa-10:if xa<30 then xa=30
  72. 710 pokev,xa:if fb=0 then gosub730:return
  73. 720 return
  74. 730 pokev+31,0:poke2041,193:pokev+21,3:pokev+2,xa:pokev+40,2
  75. 740 for y=220 to 50 step-1:pokev+3,y
  76. 750 if peek(v+31)and2=2thencl=1:return
  77. 760 next:rc=0:pokev+21,peek(v+21)and(255-2):gosub1300:return
  78. 770 wo$(1)=nw$:wo$(2)=wg$:wo$(3)=wh$:cw=1:return
  79. 780 wo$(1)=wg$:wo$(2)=nw$:wo$(3)=wh$:cw=2:return
  80. 790 wo$(1)=wg$:wo$(2)=wh$:wo$(3)=nw$:cw=3:return
  81. 800 print"[147]you splasted three in a row"
  82. 810 print:print"without a mistake !!!":for rc=1 to 2500:next
  83. 820 rc=0:print"[147]":poke53281,1:pokev+40,0:forwa=1 to 500:next
  84. 830 fori=1to15:pw=int(rnd(.)*50):printspc(pw)"[144]nice going!":next
  85. 840 for wa=1 to 2000:next:poke53281,13
  86. 850 pokev+21,peek(v+21)and(255-2):pokev+29,0:pokev+23,0:cw=0:pokev+3,0
  87. 860 gosub1330
  88. 870 ifxa<109 and cw=1 then gosub1170:es=1:return
  89. 880 ifxa<205andxa>109andcw=2thengosub1170:es=1:return
  90. 890 if xa>189 and cw=3 then gosub1170:es=1:return
  91. 900 if es=0 then gosub1300
  92. 910 pokev+21,peek(v+21)and(255-2):pokev+3,0:rc=0:return
  93. 920 rp=int((rw/25)*100):pokev+21,0
  94. 930 print"[147]you splasted "rp"% of the words"
  95. 940 print"the words you got correct are":print
  96. 950 fori=1 to rw:printrw$(i),:next
  97. 960 print"the words you got wrong are":print
  98. 970 fori=1 to ww:printww$(i),:next
  99. 980 print:printspc(8)"hit any key to continue[144]"
  100. 990 get wa$:if wa$=""then990
  101. 1000 print"[147]"spc(13)in$"'s score was "sc
  102. 1010 print:print"   the best score for this session is"
  103. 1020 ifin$=hn$then1040
  104. 1030 ifsc=hsthenprint"    a tie between "in$" and "hn$" with "sc:goto1060
  105. 1040 ifsc>hsthen hs=sc:hn$=in$
  106. 1050 print:printspc(15)hn$"'s  "hs
  107. 1060 print"   would you like to try again (y/n)"
  108. 1070 get pa$:if pa$="y"or pa$="n"then1090
  109. 1080 goto1070
  110. 1090 if pa$="y"thenforer=1to25:y(er)=0:rw$(er)="":ww$(er)="":next
  111. 1100 ifpa$="y" then rw=0:ww=0:sc=0:goto200
  112. 1110 print"[147]is there anyone else who wants to play ?":printspc(15)"(y,n)"
  113. 1120 get pb$:if pb$="y"or pb$="n"then1140
  114. 1130 goto1120
  115. 1140 if pb$="y"thenforer=1to25:y(er)=0:rw$(er)="":ww$(er)="":next
  116. 1150 ifpb$="y"thenrw=0:ww=0:sc=0:goto190
  117. 1160 end
  118. 1170 if pl=1 then sc=sc+10
  119. 1180 if pl=2 then sc=sc+12
  120. 1190 if pl=3 then sc=sc+15
  121. 1200 rn=rn+1:for ll=sl to sl+24:poke ll,0:next:poke sl+24,15
  122. 1210 poke sl+5,64:poke sl+6,136
  123. 1220 pokesl+1,28:poke sl,49:poke sl+4,33:for sn=1 to 750:next
  124. 1230 pokesl+1,38:pokesl,38:pokesl+4,33:forsn=1to700:next
  125. 1240 poke sl+4,32:for t=1 to 50:next
  126. 1250 poke sl+1,56:poke sl,99:poke sl+4,33:for sn=1 to 700:next
  127. 1260 poke sl+4,32:for t=1 to 500:next
  128. 1270 pokev+21,peek(v+21)and(255-2):pokev+3,0
  129. 1280 if rn=3 then gosub800:rn=0
  130. 1290 return
  131. 1300 forll=sltosl+24:pokell,0:next:pokesl+24,15:pokesl+5,34:pokesl+6,200
  132. 1310 pokesl+1,8:pokesl,97:pokesl+4,33:forsn=1to1700:next:pokesl+4,32
  133. 1320 for sn=1 to 50:next:rn=0:return
  134. 1330 print"[147]":forrc=1 to 1000:next:es=1:return
  135. 1340 datagrace,graze,whale,brake,operate,mistake,escape,grapes,safely
  136. 1350 datacrazy,break,greatest,fare,scare,square,compare,preparing,scarce
  137. 1360 datacanary,rarely,related,relaxation,reputation,bare,rare
  138. 1370 data000,000,000,000,000,000,000,000
  139. 1380 data000,000,000,000,000,024,000,000
  140. 1390 data024,000,000,024,000,000,024,000
  141. 1400 data000,024,000,062,024,124,002,024
  142. 1410 data064,002,024,064,002,024,064,127
  143. 1420 data255,254,064,060,002,064,060,002
  144. 1430 data066,060,066,064,060,002,067,255
  145. 1440 data194,071,255,226,079,255,242,000
  146. 1450 data000,000,000,000,000,000,000,000
  147. 1460 data000,000,000,000,000,000,000,000
  148. 1470 data000,000,000,008,000,000,028,000
  149. 1480 data000,042,000,000,073,000,000,073
  150. 1490 data000,000,073,000,000,008,000,000
  151. 1500 data008,000,000,008,000,000,008,000
  152. 1510 data000,008,000,000,008,000,000,008
  153. 1520 data000,000,008,000,000,008,000,000
  154.