home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 27 / 027.d81 / strings.2 (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  3KB  |  71 lines

  1. 1 rem  strings.2
  2. 80 poke53281,15:poke63280,6
  3. 100 print"[147]"tab(14)"hangman ii"tab(50)"by matthew oldham"chr$(142)
  4. 110 dimbb$(21),ns(42),wp(42,6),wc(42),ck(20),al(25),hn(11),ln(11),dr(11)
  5. 120 fori=1to21:readbb$(i):nexti
  6. 130 fori=1to42:readns(i):forj=1tons(i):readwp(i,j):nextj:nexti
  7. 140 s=54272:pokes+5,0:pokes+6,240:pokes+24,15
  8. 150 fori=0to25:al(i)=1230+i:nexti
  9. 160 fori=1to11:readhn(i),ln(i),dr(i):nexti
  10. 170 poke53281,15
  11. 180 printchr$(31)
  12. 190 printchr$(147)
  13. 200 rem     main loop
  14. 210 pv=0:fl=0:bw=0:tl=0:wd$=""
  15. 220 ifac>37thengosub370:goto250
  16. 230 rn=int(rnd(1)*42+1)
  17. 240 ifwc(rn)<>0then230
  18. 250 ac=ac+1:forj=1tons(rn):wd$=wd$+bb$(wp(rn,j)):nextj:tl=len(wd$)
  19. 260 wc(rn)=1:forj=1totl:ck(j)=0:nextj
  20. 270 ps=1884-int(tl/2):forj=0totl-1:pokeps+j,45:nextj
  21. 280 forj=0to39:poke1784+j,111:nextj
  22. 290 print"     word";ac;"start"
  23. 300 getlt$:iflt$=""then300
  24. 310 pv=asc(lt$):ifpv<65orpv>90then300
  25. 320 goto400
  26. 330 goto300
  27. 340 print"     congratulations! you escaped!!":forj=1to1500:nextj
  28. 350 print"     do you want to play again?";
  29. 352 poke198,0:wait198,1:getag$:ifag$<>"y"andag$<>"n"then352
  30. 353 printag$
  31. 354 ifag$="y"then190
  32. 360 :
  33. 364 load"strings menu",8:end
  34. 370 ifac=42thenprint"[147]     sorry, we're all out of words."
  35. 372 ifac=42thenfordl=1to500:next:goto360
  36. 380 forj=1to42:ifwc(j)=othenrn=j:return
  37. 390 nextj:return
  38. 400 l$=left$(wd$,1)
  39. 410 ifasc(l$)=pvandck(1)=0thenck(1)=1:fl=1:pokeps,pv-64
  40. 420 forj=2totl-1
  41. 430 m$=mid$(wd$,j,1)
  42. 440 ifasc(m$)=pvandck(j)=0thenck(j)=1:fl=1:pokeps+j-1,pv-64
  43. 450 nextj
  44. 460 r$=right$(wd$,1)
  45. 470 ifasc(r$)=pvandck(tl)=0thenck(tl)=1:fl=1:pokeps+tl-1,pv-64
  46. 475 forj=1totl:ifck(j)=othen480
  47. 476 nextj:goto340
  48. 480 iffl=1thenfl=0:goto300
  49. 490 sb=pv-65:pokeal(sb),pv-64:bw=bw+1
  50. 495 onbwgoto500,510,520,530,540,550,560,570
  51. 500 forj=1to10:poke1800+j,76:nextj:goto300
  52. 510 forj=1to9:poke1760+j,160:nextj:poke1770,101:goto300
  53. 520 forj=1to6:poke1722+j,67:nextj:poke1722,107:poke1729,115:goto300
  54. 530 poke1682,66:poke1689,66:goto300
  55. 540 poke1642,66:poke1649,66:goto300
  56. 550 forj=1to6:poke1602+j,67:nextj:poke1602,112:poke1609,110:goto300
  57. 560 poke1605,114:poke1645,93:goto300
  58. 570 poke1646,81:poke1686,91:poke1726,91
  59. 580 forj=1to11:pokes+1,hn(j):pokes,ln(j):pokes+4,17:fork=1todr(j):nextk
  60. 590 pokes+4,16:nextj:print"     the word was... ";wd$"         ":goto350
  61. 600 datain,re,co,pre,i,ca,d,t,s,e,f,r,n,en,ion,able,ce,a,any,m,ou
  62. 610 data5,6,20,10,12,18,5,4,20,5,10,12,3,20,1,17,3,2,9,8,4,20,5,9,8
  63. 620 data4,7,2,9,9,3,2,13,8,5,11,12,5,14,7,4,4,9,14,8,4,20,21,9,10,2,20,19
  64. 630 data3,13,5,17,2,3,1,3,3,9,8,6,2,11,10,12,14,17,5,9,8,2,10,8,3,8,2,10,4
  65. 640 data4,8,14,7,5,3,13,17,7,10,2,2,1,2,11,16,5,11,5,9,9,15,3,9,3,2,3,9,6
  66. 650 data13,3,12,5,17,4,18,3,12,13,2,6,2,3,20,5,2,3,8,21,12,4,12,21,8,10
  67. 660 data4,17,20,14,8,3,11,1,10,4,4,11,10,12,3,3,20,18,4,9,14,9,10,3,6,9
  68. 670 data8,2,20,14,3,8,14,16,6,4,6,12,5,21,9,5,11,12,18,6,9,4,9,1,17,2,5
  69. 680 data3,13,9,8,16,22,96,400,22,96,400,22,96,150,22,96,400,28,49
  70. 690 data400,25,30,150,25,30,400,22,96,150,22,96,400,22,96,150,22,96,400
  71.