home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 11
/
011.d81
/
flash
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
6KB
|
145 lines
0 gosub60000
1 print"[146]":dimw$(600),z(49),a$(6,10),u$(6,10),s$(14),s(6,10),g(6,50):w=1
2 q$(1)="off":fw=1:de=.:rv=1:fl(0)=1:fl(1)=0:z=1:re=.:nu=10:f=1:rem
3 s$(2)=" ":s$(3)=" ":s$(4)=" ":poke788,52
4 s$(6)=" ":s$(7)=" ":s$(8)=" ":s$(9)=" "
5 s$(10)=" ":s$(11)=" ":s$(12)=" ":s$(13)=" ":q$(0)="on "
6 s$(5)=" ":s$(1)=" ":s$(0)=" ":s$(14)=" "
10 poke53280,3:poke53281,3:print"[144][147] flash ";
11 print" by d.j.b. shibley ";:rem
12 forj=1to22:print" ";:next:rem
13 print" [157][148] [146]";:goto100
20 x$=w$(rnd(0)*t):ifx$=l3$orx$=l2$orx$=l1$orx$=l0$then20
22 l3$=l2$:l2$=l1$:l1$=l0$:l0$=x$:l=len(x$):a$(h,i)=x$:poke788,49
25 x=rnd(0)*(39-l):y=rnd(0)*25:ifrs=1thenx=(40-l)/2:y=11
28 print"[147]";:forj=1tox:print"";:next:forj=1toy:print"";:next
30 x=de*60+ti
32 ifti<xthen32
35 ifrv=0thenprint"";
40 iffw=0thenprint"*[157]";:forj=0to600:next:print" [157]";
42 forj=0to9:getx$:next:print"[180]";l0$;"[170]";:forj=1tol+1:print"[157]";:next
45 x=ti+c:y$=""
46 ifti<xthen46
48 forj=1tol:print" ";:next:forj=1tol:print"[157]";:next:b=ti
50 getx$:x=asc(x$+chr$(0)):y=len(y$):ifx=13then69
52 if(x=20orx=157)andy<1then50
55 ifx=20orx=157theny$=left$(y$,y-1):print"[157] [157]";:goto50
57 if(x<65orx>90)andx$<>" "andx$<>"-"then50
60 y$=y$+x$:printx$;:ify<l-1then50
69 u$(h,i)=y$:poke788,52:return
70 print"[144] # word guess score ";
72 print"[144][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]";
74 forj=1tonu:printj;:ifj=10thenprint"[157]";
75 printa$(h,j);u$(h,j);s(h,j);"[157]% "
76 next
77 print" your average is";int(g(h,z));"[157]% ":return
100 print" press 1 - 6 for number of players"
102 print" press '[207]' for the option menu"
104 getx$:if(val(x$)<1orval(x$)>6)andx$<>"o"andx$<>"0"then104
110 ifx$<>"o"andx$<>"0"then180
115 poke53280,10:poke53281,2:print"[147]"
120 print"1 - number of words per round is";nu;"[157] "
122 print"2 - random screen is turned ";q$(rs);""
125 print"3 - forewarn is turned ";q$(fw);""
128 print"4 - reverse video is turned ";q$(rv);""
130 print"5 - delay between words is";de;"sec.";""
135 print" press number to change or return [145]"
140 getx$:if(val(x$)<1orval(x$)>5)andx$<>chr$(13)then140
145 ifx$=chr$(13)then10
148 ifx$="2"thenrs=fl(rs):goto120
150 ifx$="3"thenfw=fl(fw):goto120
153 ifx$="4"thenrv=fl(rv):goto120
155 ifx$="5"then170
158 print" return number of words (10 max) [157]";
160 getx$:ifval(x$)<1andx$<>chr$(13)andx$<>"0"then160
161 ifx$=chr$(13)thennu=10:goto120
162 printx$;
165 gety$:ifval(y$)<1andy$<>"[157]"andy$<>chr$(13)andy$<>chr$(20)andy$<>"0"then165
166 ify$="[157]"ory$=chr$(20)thenprint"[157] [157]";:goto160
167 printy$;:nu=val(x$+y$):ifnu>10thennu=10
168 ifnu<1thennu=1
169 goto120
170 print" press 0 - 5 for new delay "
172 getx$:if(val(x$)<1orval(x$)>5)andx$<>"0"then172
175 de=val(x$):goto120
180 n=val(x$):ifn=1thenn$(n)="player 1":goto190
185 poke53280,4:print"[147]":forj=1ton:n$(j)="player"+str$(j):print"";n$(j)
187 input"return your name";n$(j):n$(j)=left$(n$(j),8)
188 iflen(n$(j))<8thenn$(j)=n$(j)+" ":goto188
189 next
190 poke53280,7:print"[147] depress desired skill level (1-3)"
192 getk$:ifval(k$)<1orval(k$)>3then192
200 open2,8,2,"0:rclst"+k$+",s,r":input#2,t:poke53280,2:ifst=0then250
210 print"insert - proper disk for vocabulary load":close2:goto200
250 poke53281,15:print"[147][144] [208]lease wait while [201] load my vocabulary"
255 forj=0tot:input#2,w$(j):next:close2
260 forh=1ton:forj=0to9:getx$:next:c=40
261 print"[147][144] press any key when ready to start[145][145][145][145]"
262 printspc((40-len(n$(h)))/2);n$(h);"[145]"
264 forj=1to100:getx$:ifx$<>""thenj=100
266 next:ifx$<>""then305
268 print" [145]"
270 forj=1to50:getx$:ifx$<>""thenj=50
274 next:ifx$=""then262
305 getx$:getx$:getx$:fori=1tonu:gosub20
350 b=ti-b:m=0:forj=1tol:ifmid$(a$(h,i),j,1)<>mid$(u$(h,i),j,1)thenm=m+1
365 next:s(h,i)=((l-m)/l)*75
370 ifb<l/(val(k$)*2.1)*60thens(h,i)=s(h,i)+25:goto390
375 s(h,i)=s(h,i)+(((l/(val(k$)*2.1))*60)/b)*25
390 c=c*.9:ifi<2then480
410 v=(s(h,i)+s(h,i-1)+s(h,i-2))/3:ifv>85thenc=c-(1/(101-v))*(c/10)
411 ifv<70thenc=c+(70-v)/70*(c/5)
480 next
482 g(h,z)=.:forj=1tonu:g(h,z)=g(h,z)+s(h,j):s(h,j)=int(s(h,j))
483 iflen(a$(h,j))<14thena$(h,j)=a$(h,j)+s$(len(a$(h,j)))
485 iflen(u$(h,j))<14thenu$(h,j)=u$(h,j)+s$(len(u$(h,j)))
486 next:g(h,z)=g(h,z)/nu
490 print"[147]":gosub70
538 print" ";n$(h);" press shift key to hold fram [157][148]e"
540 forj=1to4000:next
545 ifpeek(653)=1then545
550 next:print"[157][157] [157][148] ":forj=0to9:getx$:next
555 forh=1ton:print" ";n$(h):gosub70:x=0
560 forj=1to5
562 fordl=1to100:nextdl
565 print" press stop key to end or n-next round[145]"
570 fork=1to70:getx$:ifx$=""orx$="n"orx$="[206]"thenk=70
572 next:ifx$=""orx$="n"orx$="[206]"thenj=5:goto590
575 print" "
576 ifpeek(653)=0andx=1thenj=5:goto590
577 fork=1to40:getx$:ifx$=""orx$="n"thenk=40
580 next:ifx$=""orx$="n"thenj=5
582 ifpeek(653)=0andx=1thenj=5
590 next:ifpeek(653)=1thenx=1:goto560
592 ifx$=""orx$="n"thenh=n
595 next:ifx$<>""andx$<>"n"then555
598 ifx$="n"andz<50thenz=z+1:goto260
600 poke53280,4:poke53281,3:print"[147][158]";
605 print" ";
610 forj=0to22:print" ";:next
615 print" [157][148] [144]"
617 print"game over"
618 print"";z;"rounds played"
619 print"[184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][144]"
620 forj=1ton:fork=1toz:x(j)=x(j)+g(j,k):next:x(j)=x(j)/z:next
625 forj=1ton:x=.:y=.:fork=1ton:ifx(k)>xtheny=k:x=x(k)
628 next:print"";n$(y);" your overall average is";int(x(y));"[157]%"
630 x(y)=.:next:goto63000
60000 t$=" ":c=0:c$="":print"[147]":poke53281,0
60030 printspc(7)""t$:printspc(7)" [198]lash [146]"
60051 printspc(7)""t$:print:printtab(18)"by"
60060 print:printspc(14)"[196][202][194] [211]hibley"
60070 print:printspc(12)"[195]opyright 1985"
60080 print:print:print:print" [204][207][193][196][211][212][193][210] is not public domain."
60090 print:print" [208]lease respect the author's rights."
60100 print:print" [208]ress space bar to continue."
60110 forcc=1to48:getk$:ifk$=" "then60130
60120 ifcc=1thenprintmid$(c$,c+2,1)"[145][145]";:c=not(c)
60125 next:goto60100
60130 printc$:return
63000 rem connect back to loadstar
63002 print" [208]lease press a key"
63003 poke198,0:wait198,1
63010 print"[147]load"chr$(34)"payload"chr$(34)",8":print"run"
63020 poke631,13:poke632,13:poke198,2:poke788,49:end