home *** CD-ROM | disk | FTP | other *** search
/ Highscore 2 / Highscore_2_19xx_-.d64 / puzzleword (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  6KB  |  181 lines

  1. 10 rem puzzleword==============c64
  2. 20 rem (p) commodore disc
  3. 30 rem ===========================
  4. 40 rem (c) peter bergen       v3.5
  5. 50 rem (v) a.mittelmeyer      v2.0
  6. 60 rem
  7. 70 rem basic v2.0
  8. 80 rem c64
  9. 90 rem ===========================
  10. 91 ifpeek(49154)=174then100
  11. 92 sys57812"sysmc",8,0:poke780,0
  12. 93 poke781,254:poke782,191:sys65493
  13. 100 at=49152:ef=49337:gosub 1590
  14. 110 data"autobahn","scheitel","tablette","haarnetz","freibier"
  15. 120 data"tagebuch","wildbret","joystick","computer","putzfrau"
  16. 130 data"trennung","dreizehn","foxtrott","narzisse","gasthaus"
  17. 140 data"farbfoto","schatten","obstwein","badetuch","hochzeit"
  18. 150 data"paranuss","werkzeug","abendrot","liebelei","recorder"
  19. 160 data"kuhstall","senftube","maschine","postbote","stehpult"
  20. 170 data"holzkopf","clubraum","witzbold","himbeere","flugzeug"
  21. 180 a=rnd(-ti):dims%(5):dimw$(3):dimx%(3,8):dimy%(8):hs=1000
  22. 190 v=15:h=19:k=1643:ru=1:fora=1to4:s%(a)=0:next
  23. 200 poke53281,0:printchr$(147);
  24. 210 gosub1250:gosub1090:gosub1280:gosub770:sp=1:gosub890
  25. 220 poke56322,224:rem steuerung
  26. 230 jo=peek(56320):ifjo=119thengosub340:gosub290
  27. 240 ifjo=123thengosub360:gosub290
  28. 250 ifjo=126thengosub380:gosub290
  29. 260 ifjo=125thengosub400:gosub290
  30. 270 ifjo=111thengosub1530:gosub430:gosub1540
  31. 280 goto230
  32. 290 s%(sp)=s%(sp)+1:gosub320:ifs%(sp)>999thengoto1420
  33. 300 return
  34. 310 rem punktanzeige
  35. 320 sysat,6,sp*2+13:printye$right$(" "+str$(s%(sp)),3);:return
  36. 330 rem kursorverschiebung
  37. 340 ifh=27thens%(sp)=s%(sp)-1:return
  38. 350 gosub1070:h=h+1:gosub1060:k=k+1:gosub630:gosub1070:h=h+1:k=k+1:gosub1060:return
  39. 360 ifh=11thens%(sp)=s%(sp)-1:return
  40. 370 gosub1070:h=h-1:gosub1060:k=k-1:gosub630:gosub1070:h=h-1:k=k-1:gosub1060:return
  41. 380 ifv=7thens%(sp)=s%(sp)-1:return
  42. 390 gosub1070:v=v-1:gosub1060:k=k-40:gosub700:gosub1070:v=v-1:k=k-40:gosub1060:return
  43. 400 ifv=23thens%(sp)=s%(sp)-1:return
  44. 410 gosub1070:v=v+1:gosub1060:k=k+40:gosub700:gosub1070:v=v+1:k=k+40:gosub1060:return
  45. 420 rem auswertung
  46. 430 b=1354
  47. 440 fora=1to8:b=b+2:y%(a)=peek(b)+64:next:gosub560
  48. 450 ifw>0thengosub550:gosub520:return
  49. 460 b=b+64:ifb<1930thengoto440
  50. 470 b=1276
  51. 480 fora=1to8:b=b+80:y%(a)=peek(b)+64:next:gosub560
  52. 490 ifw>0thengosub550:gosub520:return
  53. 500 b=b-638:ifb<1294thengoto480
  54. 510 return
  55. 520 gosub880:gosub870
  56. 530 sp=sp+1:ifsp>sbthensp=1:ru=ru+1:ifru>5thengoto1420
  57. 540 gosub890:gosub880:return
  58. 550 gosub1010:gosub920:gosub990:return
  59. 560 w=0:ford=1to3:wz=0:fora=1to8
  60. 570 ify%(a)=x%(d,a)thenwz=wz+1
  61. 580 next:ifwz>7thenw=d
  62. 590 next:return
  63. 600 rem neuer buchstabe
  64. 610 gosub1050:gosub840:gosub1040:return
  65. 620 rem rand vertikal
  66. 630 ifv=7thenb=k+40:d=peek(k+40):gosub610:return
  67. 640 ifv=23thenb=k-40:d=peek(k-40):gosub610:return
  68. 650 rem buchstabentausch vertikal
  69. 660 w1=peek(k-40):w2=peek(k+40)
  70. 670 b=k-40:d=w1:gosub1050:b=k+40:d=w2:gosub1050:b=k-40:gosub1040:b=k+40:d=w1:gosub1040
  71. 680 return
  72. 690 rem rand horizontal
  73. 700 ifh=11thenb=k+1:d=peek(k+1):gosub610:return
  74. 710 ifh=27thenb=k-1:d=peek(k-1):gosub610:return
  75. 720 rem buchstabentausch horizontal
  76. 730 w1=peek(k-1):w2=peek(k+1)
  77. 740 b=k-1:d=w1:gosub1050:b=k+1:d=w2:gosub1050:b=k-1:gosub1040:b=k+1:d=w1:gosub1040
  78. 750 return
  79. 760 rem spielfeld
  80. 770 gosub830:poke646,6:b=1354
  81. 780 fora=1to8:b=b+2:gosub840:gosub1050:gosub1040:next:b=b+64
  82. 790 ifb<1930thengoto780
  83. 800 fora=10to22:sysat,1,a:printye$rn$left$(bl$,9);:sysat,29,a:printleft$(bl$,10)rf$;:next
  84. 810 gosub860:gosub880:sysat,30,15:printrn$"auswahl:";
  85. 820 forw=1to3:gosub920:gosub990:next:gosub1060:return
  86. 830 poke646,2:fora=7to23:sysat,11,a:print"*****************";:next:return
  87. 840 letd=int(rnd(1)*26)+1:return
  88. 850 rem anzeigen
  89. 860 gosub900:forsp=1to4:gosub320:next
  90. 870 fora=1to4:sysat,2,a*2+13:printye$rn$;:print;a;c1$".:":next:return
  91. 880 sysat,30,12:printye$+rn$+"runde:";:sysat,36,12:printye$rf$;
  92. 881 printright$(str$(ru),2):return
  93. 890 sysat,2,sp*2+13:printye$;:print;sp;c1$".":return
  94. 900 sysat,2,12:printye$;:print;rn$"hs:":sysat,6,12:printye$;
  95. 901 printright$(" "+str$(hs),3):return
  96. 910 rem wortwahl
  97. 920 restore:z=int(rnd(1)*35)+1:fora=1toz:readr$:next:goto980
  98. 930 fora=1to8:v$=mid$(w$(w),a,1):x%(w,a)=asc(v$):next:return
  99. 940 rem wort-ueberpruefung
  100. 950 wx=0:fora=1to3:ifa=wthengoto970
  101. 960 ifw$(a)=w$(w)thenwx=1
  102. 970 next:ifwx=1then920
  103. 971 goto930
  104. 980 ifr$=w$(w)then920
  105. 981 w$(w)=r$:goto950
  106. 990 forl=1to6:gosub1020:next:return
  107. 1000 rem wort-darstellung
  108. 1010 forl=6to1step-1:gosub1020:next:return
  109. 1020 poke646,15:sysat,30,w*2+15:printrn$;:print;w$(w);rf$:forp=1to50:next:return
  110. 1030 rem buchstaben-darstellung
  111. 1040 forl=14to110step16:pokeb+54272,15:pokeb,d:next:return
  112. 1050 forl=126to14step-16:pokeb+54272,12:pokeb,d:next:return
  113. 1060 poke646,7:sysat,h,v:print"*";:return
  114. 1070 poke646,2:sysat,h,v:print"*";:return
  115. 1080 rem ueberschrift
  116. 1090 sysat,0,1:printrf$" "z1$zr$rn$" "rf$" "rn$" "rf$" "rn$" ";
  117. 1100 printrf$z1$z1$" "rn$" "rf$z1$z1$" "rn$" "rf$" "rn$b3$rf$" "z1$z1$rn$" "rf$" ";
  118. 1110 printrn$b2$rf$" "rn$" "rf$zt$z1$zr$rn$" "rf$" "z1$zr$rn$" "rf$" "z1$zr$
  119. 1120 sysat,0,2:printrf$" "rn$" "rf$" "rn$" ";
  120. 1130 printrf$" "rn$" "rf$" "rn$b2$rf$zt$rn$zt$b2$rf$zt$;
  121. 1140 printrn$zt$" "rf$" "rn$b3$rf$" "rn$b3$rf$" "rn$b2$rf$" ";
  122. 1150 printrn$" "rf$" "rn$" "rf$" "rn$" "rf$" "rn$" "rf$" "rn$" "rf$" "rn$" "rf$" "
  123. 1160 sysat,0,3:printrf$" "z1$rn$zt$" "rf$" "rn$" ";
  124. 1170 printrf$+" "+rn$+" "+zb$+rf$+zb$+rn$+b2$+zb$+rf$+zb$+rn$+" ";
  125. 1180 print" "rf$" "rn$b3$rf$" "z1$rn$b2$rf$" "z0$rn$z0$rf$" "rn$" "rf$" ";
  126. 1190 printrn$" "rf$" "rn$" "rf$" "zq$rn$z0$" "rf$" "rn$" "rf$" "
  127. 1200 sysat,0,4:printrf$" "rn$b3$rf$zq$rn$;
  128. 1210 printz1$rf$zb$rn$" "rf$" "rn$z1$z1$" "rf$" ";
  129. 1220 printrn$z1$z1$" "rf$" "rn$z1$z1$" "rf$" "rn$z1$z1$" "zr$rf$zb$zq$rn$zt$" "rf$zq$;
  130. 1230 printrn$z1$rf$zb$rn$" "rf$" "rn$" "rf$" "rn$" "rf$" "rn$z1$rf$
  131. 1240 return
  132. 1250 poke646,6:fora=0to2:sysat,0,a:printrn$bl$;:next
  133. 1260 return
  134. 1270 rem anleitung
  135. 1280 sysat,1,8:printwh$"versuchen sie durch verschieben des"
  136. 1290 print"gelben sternchens (joystick port 2)"
  137. 1300 print"mit so wenig zuegen wie moeglich eines"
  138. 1310 print"der 3 auswahlwoerter zu bilden."
  139. 1320 print"steht das sternchen zwischen 2 buchsta-"
  140. 1330 print"ben, werden diese vertauscht; steht es"
  141. 1340 print"am spielfeldrand, entsteht neben dem"
  142. 1350 print"sternchen ein neuer buchstabe."
  143. 1360 print"wurde ein wort gebildet, erfolgt durch"
  144. 1370 print">fire< ein austausch in der wortauswahl,"
  145. 1380 print"sowie ggf. der spielerwechsel."
  146. 1390 print"das spiel endet nach 5 runden, oder wenn"
  147. 1400 print"mehr als 999 zuege benoetigt wurden."
  148. 1410 gosub1510:poke198,0:printc4$"wieviel spieler";
  149. 1412 inputsb:printchr$(147);:gosub1250:goto1090
  150. 1420 gosub1520:fora=1tosb
  151. 1430 ifs%(a)<hsthenhs=s%(a)
  152. 1440 next:gosub900
  153. 1450 b=17:gosub830:fora=8to22:sysat,b,a:printlg$"ende";:ifb=17thenb=18:goto1460
  154. 1451 b=17
  155. 1460 next:poke646,2:sysat,17,16:print"****"c4$c4$left$(ql$,4)"****";
  156. 1470 sysat,12,17:printlg$">fire<=neustart";
  157. 1480 ifpeek(65320)=111thengoto190
  158. 1490 goto1480
  159. 1500 rem sounds
  160. 1510 return
  161. 1520 return
  162. 1530 return
  163. 1540 return
  164. 1590 rem nachspann ===============
  165. 1600 rem * farbcodes/steuercodes *
  166. 1610 wh$=chr$(005):c4$=chr$(017)
  167. 1620 rn$=chr$(018):rf$=chr$(146)
  168. 1630 lg$=chr$(153):c1$=chr$(157)
  169. 1640 ye$=chr$(158)
  170. 1650 rem *** zeichensatz/graphik *
  171. 1660 z0$=chr$(161):z1$=chr$(162)
  172. 1670 zb$=chr$(172):zq$=chr$(187)
  173. 1680 zr$=chr$(188):zt$=chr$(190)
  174. 1690 rem ********* zeichenfolgen *
  175. 1700 b2$=" "+" ":b3$=b2$+" "
  176. 1710 for q=1 to 40
  177. 1720 ql$=ql$+c1$:bl$=bl$+" "
  178. 1730 next q
  179. 1740 return
  180. 1750 rem =========================
  181.