home *** CD-ROM | disk | FTP | other *** search
/ Tiger Disk 6 / Tiger_Disk_006_19xx_Tiger-Crew-Disk_de_Side_B.d64 / yahtzee!! (.txt) < prev   
Commodore BASIC  |  2023-02-26  |  5KB  |  166 lines

  1. 10 poke53281,0:poke53280,0
  2. 50 print "[147]           [155]willkommen zu"
  3. 60 print "             [172][162][162][162][162][162][162][162][187]"
  4. 70 print "             [161]yahtzee[146][161]";
  5. 80 print "[157][157][157][157][157][157][157][157][157][188][162][162][162][162][162][162][162][146][190]"
  6. 90 s$="123456dvhkgcy":f=0:g=0:ss=0:e$=""
  7. 95 for i=1 to 39:e$=e$+" ":next
  8. 100 l$=""
  9. 105 a$(0)="[166][166][166][157][157][157][166][166][166][157][157][157][166][166][166][157][157][157][145][145]"
  10. 110 a$(1)="   [157][157][157] [209] [157][157][157]   [157][157][157][145][145]"
  11. 115 a$(2)="[209]  [157][157][157]   [157][157][157]  [209][157][157][157][145][145]"
  12. 120 a$(3)="[209]  [157][157][157] [209] [157][157][157]  [209][157][157][157][145][145]"
  13. 125 a$(4)="[209] [209][157][157][157]   [157][157][157][209] [209][157][157][157][145][145]"
  14. 130 a$(5)="[209] [209][157][157][157] [209] [157][157][157][209] [209][157][157][157][145][145]"
  15. 135 a$(6)="[209][209][209][157][157][157]   [157][157][157][209][209][209][157][157][157][145][145]"
  16. 140 b$="[176][192][192][192][174][157][221][157][221][157][221][157][189][157][157][192][157][157][192][157][157][192]"
  17. 145 b$=b$+"[157][157][173][157][145][221][157][145][221][157][145][221][157][145]":st$=""
  18. 150 c$="":for i=1 to 6:c$=c$+"     [146]  ":next
  19. 155 c$=left$(c$,52):cr$=chr$(13)
  20. 160 d$="[157][207][163][163][163][208][157][167][157][186][157][157][164][157][157][164][157][157][164][157][157][204][157][145][165]"
  21. 170 dim s(13)
  22. 200 print "";cr$;"instruktionen (j/n)? ";
  23. 210 f=18-f:print chr$(f);" [146][157]";:t=ti
  24. 220 get i$:if i$="" and ti-t<25 then 220
  25. 230 if i$="n" then 630
  26. 240 if i$<>"j" then 210
  27. 250 print "[147]   dieses spiel wird mit  5 wuerfeln"
  28. 260 print "gespielt. - ziel ist es, so viele"
  29. 270 print "punkte wie moeglich zu erzielen."
  30. 280 print "es gibt 13 durchgaenge, du kannst"
  31. 290 print "bis zu dreimal wuerfeln."
  32. 300 print "  nach jedem wurf (ausser dem letzten)"
  33. 310 print "kannst du einen oder mehrere wuerfel"
  34. 320 print "behalten. mit den anderen wird noch-"
  35. 330 print "mals gewuerfelt.  -  zum beispiel :";l$;"";
  36. 340 for i=1 to 5:print b$;"";:next
  37. 350 h(1)=5:h(2)=2:h(3)=3:h(4)=3:h(5)=1
  38. 360 printl$;"";:for i=1 to 5:print a$(h(i));
  39. 370 print "";:next:print "keep? 33[145]"
  40. 380 poke198,0:wait198,1:poke198,0
  41. 400 print "[145][145][145][145][145][145][145][145][145][145][145][145]bedeutet,dass ";
  42. 410 print "von    5[146] 2[146] 3[146] 3[146] 1[146]    du die"
  43. 420 print "2 3[146]er behaeltst und mit"
  44. 430 print " 5[146] 2[146] 1[146] nochmal gewuerfelt wird."
  45. 440 print "mit  a [146] behaeltst du alle!"
  46. 450 get i$:if i$="" then 450
  47. 460 print "[147]   nach dem wuerfeln kannst du die fuenf";
  48. 470 print "werte in eine der 13 kategorien eintra- ";
  49. 480 print "gen. - je eine pro durchgang. -"
  50. 490 print "am ende werden die 13 werte addiert."
  51. 500 print "dies ergibt die summe (plus bonus)."
  52. 510 print "die 13 kategorien sind:"
  53. 520 print "1 - einer";cr$;"2 - zweier";cr$;"3 - dreier"
  54. 530 print "4 - vierer";cr$;"5 - fuenfer";cr$;"6 - sechser"
  55. 540 print "d - drei gleiche (alle augen zaehlen)"
  56. 550 print "v - vier gleiche (wie vorstehend)"
  57. 560 print "h - full house (zaehlt 25)"
  58. 570 print "k - kleine strasse(4 in folge) zaehlt 30";
  59. 580 print "g - grosse strasse(5 in folge) zaehlt 40";
  60. 590 print "c - chance (es zaehlen alle augen)"
  61. 600 print "y - yahtzee (5 gleiche) zaehlt 50"
  62. 610 print "      return[146]  zum anfangen !"
  63. 620 get i$:if i$="" then 620
  64. 630 print "[147]";c$;:for i=1 to 6
  65. 640 print " ";mid$(s$,i,1);"er [146]  ";:next
  66. 650 print "[157][157]";c$:print c$;"drei [146]  ";
  67. 660 print "vier [146]  house[146]  klein[146]  gross[146]";
  68. 670 print "  chanc[146]";c$
  69. 680 print spc(16);"       [157][157][157][157][157][157][157]";
  70. 690 print "yahtzee[157][157][157][157][157][157][157]       ";cr$;l$;
  71. 695 for i=1 to 5:print b$;"";:next
  72. 700 for i=1 to 13:s(i)=-1:next:q=0:g=g+1
  73. 710 for i=1 to 13:l=1:for j=1 to 3
  74. 720 for k=l to 5:h(k)=int(6*rnd(1)+1):next
  75. 730 print l$;"";:for k=1 to 5
  76. 740 if k>=l then print a$(0);
  77. 742 print a$(h(k));"";:next:if j=3 then 920
  78. 744 get i$:if i$<>""then 744
  79. 750 print l$;""
  80. 760 print "keep? ";:k=0
  81. 770 f=18-f:print chr$(f);" [146][157]";:t=ti
  82. 780 get i$:if i$="" and ti-t<25 then 780
  83. 790 if i$>"/" and i$<"7" then print i$;:k=k+1:i(k)=asc(i$)-48
  84. 800 if i$="a" then 915
  85. 805 if i$=chr$(20) and k>0 then k=k-1:print " [157][157]";
  86. 810 if i$<>cr$ then 770
  87. 815 if k=0 then l=1:goto 910
  88. 820 for l=1 to k:for m=l to 5
  89. 830 if i(l)=h(m) then 850
  90. 840 next:goto 860
  91. 850 h(m)=h(l):h(l)=i(l):next l:goto 890
  92. 860 print "  ???[145]":t=ti
  93. 870 if ti-t<30 then 870
  94. 880 print e$;"[145]":goto 760
  95. 890 print "[145]";cr$;e$:if k<>5 then 910
  96. 900 print cr$;" drueck        a[146] um alle zu behalten![145]":t=ti
  97. 902 if ti-t<120 then 902
  98. 904 print e$:goto 920
  99. 910 next j
  100. 915 print "[157][157][157][157][157][157]       ";
  101. 920 if i<13 then 950
  102. 930 for a=1 to 13:if s(a)<>-1 then next
  103. 940 goto 1030
  104. 950 print l$;""
  105. 960 print spc(25);"wohin? ";
  106. 970 f=18-f:print chr$(f);" [146][157]";:t=ti
  107. 980 get i$:if i$="" and ti-t<25 then 980
  108. 990 for a=1 to 13:if i$=mid$(s$,a,1) then 1010
  109. 1000 next:goto 970
  110. 1010 if s(a)=-1 then 1028
  111. 1020 print cr$;"du kannst nur einmal eintragen !     [145]":t=ti
  112. 1022 if ti-t<120 then 1022
  113. 1024 print e$;"[145]";:goto 950
  114. 1028 print "[157][157][157][157][157][157][157]        ";
  115. 1030 s(a)=0:for j=1 to 6:m(j)=0:next
  116. 1040 for j=1 to 5:m(h(j))=m(h(j))+1:next
  117. 1050 if a<7 then s(a)=a*m(a):goto 1190
  118. 1060 on a-6 goto 1070,1070,1090,1110,1110,1180,1160
  119. 1070 forj=1 to 6:if m(j)>a-5 then 1180
  120. 1080 next:goto 1190
  121. 1090 for j=1 to 6:if m(j)=1 or m(j)=4 then 1190
  122. 1100 next:s(9)=25:goto 1190
  123. 1110 c=0:for j=1 to 6:if m(j)=5 then 1150
  124. 1120 c=c+1:if m(j)=0 then c=0
  125. 1130 if c=a-6 then 1150
  126. 1140 next:goto 1190
  127. 1150 s(a)=10*a-70:goto 1190
  128. 1160 for j=2 to 5:if h(j)<>h(1) then 1190
  129. 1170 next:s(13)=50:gosub 2000:goto 1190
  130. 1180 s(a)=h(1)+h(2)+h(3)+h(4)+h(5)
  131. 1190 if a=13 or s(13)<>50 then 1220
  132. 1200 for j=2 to 5:if h(j)<>h(1) then 1220
  133. 1210 next:q=q+100:print cr$;"   100 point bonus[145]":gosub 2000:t=ti
  134. 1212 if ti-t<80 then 1212
  135. 1214 print e$
  136. 1220 i$=str$(s(a))+" ":if s(a)>9 then i$=right$(i$,len(i$)-1)
  137. 1230 print "";:j=a:if a>6 then print "";:j=a-6
  138. 1240 if a<>13 then print spc(7*j-6);d$;i$:goto 1270
  139. 1250 print "";spc(16);"[207][163][163][163][163][163][208][157][167]";
  140. 1260 print "[157][186][157][157][164][157][157][164][157][157][164][157][157][164][157][157][164][157][157][204][157][145][165] ";i$;" "
  141. 1270 next i
  142. 1300 t=s(1)+s(2)+s(3)+s(4)+s(5)+s(6)
  143. 1310 print l$;"";cr$;"oben     =";t;"[157] punkte"
  144. 1320 if t>62 then t=t+35:print "plus 35 bonus punkte"
  145. 1330 u=s(7)+s(8)+s(9)+s(10)+s(11)+s(12)+s(13)
  146. 1340 print "unten       =";u;"[157] punkte"
  147. 1350 if q>0 then print "plus";q;"[157] bonus punkte"
  148. 1360 print "gesamt= ";t+u+q;"[157] [146] punkte"
  149. 1365 ss=ss+t+u+q
  150. 1370 print "noch ein spiel?";
  151. 1372 t=ti
  152. 1374 get i$:if i$="" and ti-t<25 then 1374
  153. 1376 f=18-f:print chr$(f);" [146][157]";:if i$="" then 1372
  154. 1380 if left$(i$,1)="y" then 630
  155. 1385 if g=1 then end
  156. 1390 print "[145][145][145][145]";cr$;e$
  157. 1400 print "du hast";ss;"[157] punkte in";
  158. 1410 print g;"[157] spielen."
  159. 1420 print "das sind  ";int(ss/g+.5);
  160. 1430 print "[157] [146] punkte je spiel."
  161. 1440 print e$;"[145]";:end
  162. 2000 c=53:for k=1 to 6
  163. 2010 poke 59409,c:c=113-c:t=ti
  164. 2020 if ti-t<10 then 2020
  165. 2030 next:return
  166.