home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1989 May / 1989-05.d64 / verbatim (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  4KB  |  109 lines

  1. 10 rem copyright 1989 compute! publications - all rights reserved
  2. 20 dimwo$(400):x=rnd(-ti)
  3. 30 lx(3)=1:i=1:j=3
  4. 40 ifj=7then70
  5. 50 readb$:ifb$="-1"thenmx(j)=i-1:j=j+1:lx(j)=i:goto40
  6. 60 wo$(i)=b$:i=i+1:goto50
  7. 70 a$="   [157][157][157][157][144]    [157][157][157][157][144]    [157][157][157][157][144]   [145][145][145]"
  8. 80 dn(1)=1:dn(2)=6:dn(3)=11:dn(4)=16:dn(5)=21
  9. 90 ac(3)=24:sp(3)=4:sp(4)=4:sp(5)=3:sp(6)=3
  10. 100 ac(4)=25:ac(5)=28:ac(6)=31:do(1)=2:do(2)=7:do(3)=12:do(4)=(17):do(5)=22
  11. 110 poke53280,12:poke53281,12:printchr$(14)chr$(8):tm=16:tu=1
  12. 120 print"[147][144]   [195]opyright 1989 [195][207][205][208][213][212][197]! [208]ub., [201]nc."
  13. 130 printtab(11)"[193]ll rights reserved":print""
  14. 140 print"    ";:fori=1to8:printa$"[157]";:next
  15. 150 print"[214][197][210][194][193][212][201][205][144]"
  16. 160 e$="[175][157][157][170][180][157][157][183][145][157]"
  17. 170 n1=1:n2=2:print"     [196]o you want to [145]"e$"1[146][197][206][212][197][210] a word"
  18. 180 print"    or [145]"e$"2[146]have the 64 select a word  [145]"e$"[191][157]";
  19. 190 gosub860:np=nu
  20. 200 n1=3:n2=6
  21. 210 print"  [197]nter length of word (3-6 letters) [145]"e$"[191][157]";:gosub860:wl=nu
  22. 220 print:print
  23. 230 ifnp=2thenxx=int((mx(wl)-lx(wl)+1)*rnd(1))+lx(wl):wd$=wo$(xx):goto270
  24. 240 print"      [208]lease enter a"wl"letter word"
  25. 250 input"                       [157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]";wd$
  26. 260 iflen(wd$)<>wlthenprint"[145][145][145]":goto240
  27. 270 lm(3)=9:lm(4)=5:lm(5)=3:lm(6)=1
  28. 280 fori=1towl:as$=mid$(wd$,i,1):as(i)=asc(as$):next
  29. 290 poke53281,12:poke53280,12
  30. 300 print"[147]";:fori=1to24:print"[152]                                       "
  31. 310 next:print"                                       ";
  32. 320 fori=1063to2023step40:pokei,160:pokei+54272,12:next
  33. 330 print"                                       ":poke53281,1
  34. 340 print"";:forz=1to4:forj=1tolm(wl):print"";:next
  35. 350 fori=1towl:printa$;:next:print"":next
  36. 360 forj=1tolm(wl):print"";:next
  37. 370 fori=1towl:printa$;:next:print""
  38. 380 printspc(lm(wl)+2)""chr$(as(1)+128)
  39. 390 print"";:fori=1todo(tu):print"";:next:printspc(ac(wl))"[152]_"
  40. 400 poke198,0:print""spc(32)"[152][217]our[157][157][157][157][163][163][163][163][157][157][157][157][199]uess[157][157][157][157][157][163][163][163][163][163]"
  41. 410 printspc(32)"      [157][157][157][157][157][157][175]"
  42. 420 print""spc(32)"[212][201][205][197][210][157][157][157][157][157][163][163][163][163][163][157][157][157][157][152]"int(tm)
  43. 430 print""spc(32);:fori=1towl:gosub720:next:print"[152] ":tm=16
  44. 440 fori=1towl:ar(i)=asc(ar$(i)):next
  45. 450 lw=wl:fori=1tolw:c(i)=0:next
  46. 460 fori=1tolw:fl(i)=0:next
  47. 470 forz=1tolw
  48. 480 fori=1tolw:ifas(i)=ar(i)thenc(i)=128+ar(i):flag(i)=1
  49. 490 nexti
  50. 500 fori=1tolw:ifas(i)=ar(z)andflag(i)=0thenc(z)=ar(z):flag(i)=2:goto520
  51. 510 c(x)=32
  52. 520 nexti,z
  53. 530 print"";:fori=1todn(tu):print"";:next
  54. 540 printspc(lm(wl)+2)"";
  55. 550 fori=1towl
  56. 560 ifc(i)>0thenprint""chr$(c(i))"[146]";:goto580
  57. 570 print"[146]"chr$(ar(i));
  58. 580 print"";:next
  59. 590 ck=0:fori=1towl:ifar(i)=as(i)thenck=ck+1
  60. 600 next:ifck=wlthen640
  61. 610 print"";:fori=1todo(tu):print"";:next:printspc(ac(wl))"[152] "
  62. 620 tu=tu+1:iftu=6then670
  63. 630 goto390
  64. 640 forz=1to15:fori=1to14:poke53280,i:next:next:poke53280,12
  65. 650 gosub830
  66. 660 print""spc(32)"[195]orrect":goto700
  67. 670 gosub830
  68. 680 print""spc(32)"[207]ut of":print""spc(31)"guesses!"
  69. 690 print""spc(32)"[193]nswer:":printspc(29)"";:gosub840:print""
  70. 700 printspc(32)"[208]ress a":print spc(34)"key"
  71. 710 poke198,0:wait198,1:getc$:goto110
  72. 720 getij$:ifij$<"a"orij$>"z"then740
  73. 730 print"[152]"spc(31+i)chr$(asc(ij$)+128)"[175][157]";:ar$(i)=ij$:return
  74. 740 tm=tm-.055
  75. 750 print""
  76. 760 ifint(tm)<10thenprintspc(33)""int(tm)"[157]  ":goto780
  77. 770 printspc(33)""int(tm)
  78. 780 ifint(tm)<>0then720
  79. 790 gosub830
  80. 800 print""spc(32)"[207]ut of":print""spc(33)"time"
  81. 810 fori=1to2300:next:tm=16
  82. 820 print""spc(28)"           ":print""spc(30)"       ":goto610
  83. 830 print"":fori=1to10:printspc(30)"[152]         ":next:print"":return
  84. 840 printspc(sp(wl));
  85. 850 fori=1towl:ww(i)=asc(mid$(wd$,i,1))+128:printchr$(ww(i));:next:return
  86. 860 poke204,0:getnu$:nu=val(nu$):ifnu<n1ornu>n2then860
  87. 870 poke204,1:poke207,0:printnu$:fori=1to300:next:return
  88. 1000 rem word list
  89. 1010 rem ** 3 letter words **
  90. 1020 data man,fan,for,arm,pen,won,too,boy,hog,ape,you,yen,pay,joy,leg
  91. 1030 data yes,rod,ran,win,was,sun,gap,eat,fan,tan,top,tip,cow,dog,ear
  92. 1040 data -1
  93. 1050 rem ** 4 letter words **
  94. 1060 data fast,slow,game,warm,cold,open,only,past,read,cost,jump,junk
  95. 1070 data cave,vast,vase,womb,post,note,make,bend,zest,desk,host,gate
  96. 1080 data most,opal,trim,ache,bark,limb
  97. 1090 data -1
  98. 1100 rem ** 5 letter words **
  99. 1110 data acorn,actor,bring,broke,bribe,crimp,cough,count,dress,dealt
  100. 1120 data eight,earth,faith,graze,grape,grain,ghost,going,hello,happy
  101. 1130 data igloo,money,party,stand,tenth,waste,yodel,zebra,mouse,trait
  102. 1140 data -1
  103. 1150 rem ** 6 letter words **
  104. 1160 data mystic,diaper,basket,washer,rubber,orange,yellow,purple
  105. 1170 data quaint,exceed,jacket,robust,golfer,antler,engage,monkey
  106. 1180 data cowboy,notion,sodium,doodle,salary,window,borrow,desert
  107. 1190 data trophy,carpet,podium,motion,sickly,comedy
  108. 1200 data -1
  109.