home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 11 / 011.d81 / flash (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  6KB  |  145 lines

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