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