home *** CD-ROM | disk | FTP | other *** search
/ Dark Star 2 / Dark_Star_02_1995_-_de_Side_B.d64 / checkers (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  7KB  |  201 lines

  1. 0 gosub8000:poke53280,0:poke53281,15:print"":goto4000
  2. 1 clr:restore:print"[147]";:dimbd%(144),d1(15),mt%(15),xy%(32):v=25
  3. 5 e=3000:e1=250:b$="              "
  4. 10 poke53280,0:poke53281,15:restore
  5. 15 data1,3,1,3,1,3,1,3,3,1,3,1,3,1,3,1,1,3,1,3,1,3,1,3,2,1,2,1,2,1,2,1,1,2,1,2
  6. 16 data1,2,1,2,5,1,5,1,5,1,5,1,1,5,1,5,1,5,1,5,5,1,5,1,5,1,5,1
  7. 17 fori=1to8:forj=1to8:readbd%(i*10+j):next:next:iffthenf=0:goto232
  8. 20 data2,3,4,5,6,7,8:fori=2to8:readvx$(i):next
  9. 25 pk=32806:data32,81,207,87,213,191:fori=2to7:readty%(i):next
  10. 30 data12,14,16,18,21,23,25,27,32,34,36,38,41,43,45,47,52,54,56,58,61,63,65,67
  11. 35 data72,74,76,78,81,83,85,87:fori=32to1step-1:readxy%(i):next
  12. 40 data" ","[209]","[209][146]","[215]","[215][146]":fori=2to6:readma$(i):next
  13. 90 print"[147]";:fori=1to4:print"   [146][163][163][163]";:next:print"[157][208]"
  14. 110 n=2:fori=1to4:forj=nto3:fork=1to4
  15. 120 print"   [146]   ";:next:print"[157][167]":n=1:next
  16. 130 forj=1to3:print"[165]     [146]";:fork=1to3:print"      [146]";:next:print:next:next
  17. 150 print"[145][204][164][164]   [146]";:fori=1to3:print"[164][164][164]   [146]";:nexti:print
  18. 200 print"1[146]";:fori=2to8step2:print"";vx$(i);"";vx$(i+1);"[146]";:next:print
  19. 220 print"";:fori=2to8step2:print""vx$(i):ifi=8goto232
  20. 230 print""vx$(i+1):next
  21. 232 om=12:cm=12:pm$="00":ps$=pm$:mm$=pm$:ms$=pm$:jf=0:gosub1400
  22. 235 print:printtab(v)"my men [209]/[209][146]":printtab(v)"your men [215]/[215][146]
  23. 236 [153][163]v)"clock:":[153][163]28)"00:00
  24. 240 gosub5800
  25. 290 ifjfgoto1000
  26. 300 f2=0:fd=1:print""tab(v)"your move:":printtab(v)"from:":w=1:say"your move.":goto1600
  27. 310 print""tab(31)x1$;:x$=x1$:w=2:goto1600
  28. 320 print""tab(32)x1$:x=val(x$+x1$):ifx<11orx>88goto7030
  29. 360 onbd%(x)+1goto7030,7040,7000,7010,7010
  30. 380 mh=bd%(x):m=x:gosub2000:ifjf=0goto400
  31. 386 fori=1tojf:ifx=nm(i)thenf=1
  32. 387 next:iff=0goto7015
  33. 400 f=0:printtab(v)"to: ";:w=3:goto1600
  34. 420 print"":fori=1tofd:print:next:printtab(29)x1$;:a$=x1$:w=4:goto1600
  35. 427 print"":fori=1tofd:print:next:printtab(30)x1$:a=val(a$+x1$)
  36. 430 ifa<11ora>88goto7030
  37. 435 ifjfgoto1010
  38. 440 ifx-a=11orx-a=9goto480
  39. 450 ifbd%(x)=6and(a-x=9ora-x=11)goto480
  40. 460 goto7005
  41. 480 onbd%(a)+1goto7030,7040,490,7010,7010,7020,7020
  42. 490 m=a:gosub2000:ifa<19thenmh=6
  43. 500 fori=1toe1:ifpeek(515)=27thengetz$:goto7070
  44. 530 next:bd%(x)=2:bd%(a)=mh:gosub5800
  45. 540 print"":fori=1to12:print:next:printtab(v)b$:gosub1700
  46. 550 print""tab(25)"your move:":fori=1to6:print:next:printtab(v)"my move:":say"my move."
  47. 560 fori=1to6:printtab(25)b$:next:print"[145][145][145][145][145][145]";
  48. 600 gosub6200:ifjf=0goto700
  49. 604 hf=8:x=int(rnd(1)*jf+1):d=d(x):nm=nm(x):printtab(v)"from:";nm
  50. 608 ifnm+d+d>79andbd%(nm)=3thenbd%(nm)=4:f2=1
  51. 610 bd%(nm+d)=2:bd%(nm+d+d)=bd%(nm):bd%(nm)=2:f=nm:t=f+d+d
  52. 615 print"":fori=1tohf:print:next:printtab(v)"to:";nm+d+d:gosub5800
  53. 633 om=om-1:gosub1400:ifom=0goto6500
  54. 635 iff2goto670
  55. 640 gosub6200:ifjf=0goto670
  56. 650 h=0:fori=1tojf:ifnm(i)=tthenh=i
  57. 660 next:ifhthenhf=hf+1:nm=nm(h):d=d(h):goto608
  58. 670 gosub1720:fori=1toe1:next:gosub6000:print""tab(v)"my move:
  59. 680 [137]7070
  60. 700 mk[178]0:f1[178]0:[129]l[178]1[164]32:i[178]xy%(l):[139]bd%(i)[178]3[137]760
  61. 705 [139]bd%(i)[179][177]4[137]799
  62. 710 [129]j[178][171]11[164][171]9[169]2
  63. 720 [139]bd%(i[170]j)[179][177]2[137]755
  64. 730 bd%(i[170]j)[178]bd%(i):bd%(i)[178]2:[141]6000
  65. 735 [139]f1[178]0[175]jf[178]0[167]mk[178]0:f1[178]1
  66. 737 [139]f1[175]jf[137]750
  67. 740 mk[178]mk[170]1:d1(mk)[178]j:mt%(mk)[178]i:[139]jf[177]0[167]mt%(mk)[178]i[172][171]1
  68. 750 bd%(i)[178]bd%(i[170]j):bd%(i[170]j)[178]2
  69. 755 [130]
  70. 760 [141]1720:[129]j[178]9[164]11[169]2
  71. 770 [139]bd%(i[170]j)[179][177]2[137]796
  72. 780 bd%(i[170]j)[178]bd%(i):bd%(i)[178]2:[141]6000
  73. 785 [139]f1[178]0[175]jf[178]0[167]mk[178]0:f1[178]1
  74. 787 [139]f1[175]jf[137]795
  75. 790 mk[178]mk[170]1:d1(mk)[178]j:mt%(mk)[178]i:[139]jf[177]0[167]mt%(mk)[178]i[172][171]1
  76. 795 bd%(i)[178]bd%(i[170]j):bd%(i[170]j)[178]2
  77. 796 [130]
  78. 799 [130]
  79. 800 [129]i[178]1[164]mk:[139]mt%(i)[177]1[137]840
  80. 810 [130]:[129]i[178]1[164]mk:[139]mt%(i)[179]0[167]mt%(i)[178]mt%(i)[172][171]1:[137]840
  81. 815 [130]
  82. 840 c[178]mt%(i):ca[178]d1(i):[139]bd%(c)[178]3[175]c[170]ca[177]79[167]bd%(c)[178]4
  83. 850 bd%(c[170]ca)[178]bd%(c):bd%(c)[178]2
  84. 860 [153]""[163]v)"from:";c:[153][163]v)"to:";c[170]ca:[141]5800:[137]670
  85. 1000 [153]"":[129]i[178]1[164]12:[153]:[130]:[153][163]v)"your jump!":[137]300
  86. 1010 [129]y[178]1[164]jf:[139]a[178]x[170](2[172]d(y))[137]1040
  87. 1020 [130]:[137]7015
  88. 1040 m[178]a:[141]2000:[139]a[179]19[175]mh[178]5[167]mh[178]6:f2[178]1
  89. 1045 [129]i[178]1[164]e1:[139][194](515)[178]27[167][161]z$:[137]7070
  90. 1050 [130]:bd%(x)[178]2:bd%(a)[178]mh:bd%(x[170]d(y))[178]2:[141]5800
  91. 1055 cm[178]cm[171]1:[141]1400:[139]cm[178]0[137]6600
  92. 1057 [139]f2[137]540
  93. 1060 [141]6000:[139]jf[178]0[137]540
  94. 1070 h[178]0:[129]i[178]1[164]jf:[139]nm(i)[178]a[167]h[178]i:
  95. 1080 [130]:[139]h[178]0[137]540
  96. 1085 x[178]a:fd[178]fd[170]1:[153]"":[129]i[178]1[164]fd:[153]:[130]:[137]400
  97. 1400 [153]"":[129]i[178]1[164]14:[153]:[130]:[153][163]v)b$
  98. 1403 [153][163]v)"oni have";cm;"men
  99. 1405 printtab(v)b$+" "
  100. 1410 printtab(v)"[145][145]you have";om;"men":ifom>9thenprint"[145]";
  101. 1420 return
  102. 1600 print"":fori=1to20:print:next
  103. 1610 printtab(v)"me":printtab(v)"you"
  104. 1620 ti$="00"+pm$+ps$
  105. 1630 getx1$:ifpeek(515)=27thengetw:goto7070
  106. 1635 ifx1$<>""thenonwgoto310,320,420,427
  107. 1640 pm$=mid$(ti$,3,2):ps$=right$(ti$,2)
  108. 1650 print"[145]"tab(29)pm$;":";ps$:goto1630
  109. 1675 end
  110. 1700 print"":fori=1to20:print:nexti:printtab(v)"me":printtab(v)"you"
  111. 1710 ti$="00"+mm$+ms$
  112. 1720 mm$=mid$(ti$,3,2):ms$=right$(ti$,2):print"":form=1to21:print:next
  113. 1730 print"[145]"tab(28)mm$;":";ms$:return
  114. 2000 l=int(m/10):r=m-l*10:pn=pk+(l-1)*120+r*3:pokepn,191:return
  115. 4000 print"[147]":printtab(10)"war games checkers"
  116. 4090 fori=1to3000:next
  117. 5000 print"[147]  do you need any instructions?":print"  press y or n.
  118. 5005 say"do you need instructions"
  119. 5010 [161]a$:[139]a$[178]""[137]5010
  120. 5020 [139]a$[178]"n"[137]1
  121. 5022 [153]"load":[153][163]13)"instructions":[129]i[178]1[164]20:[153]"tantan";:[130]:[153]"
  122. 5025 say"instructions"
  123. 5030 print"1. international checker rules are in":print"   effect.
  124. 5033 say"international checker rules are in effect."
  125. 5035 [153]"2. move by entering first the row
  126. 5040 print"   number and then the column number.
  127. 5045 say"move by entring the first row number       and then the colum number."
  128. 5050 [153]"3. to cancel a move, press return
  129. 5053 say"to cancel a move    press return."
  130. 5055 print"   while ?[146] is lighted.
  131. 5060 [153]"4. enter multiple jumps, 1 jump":[153]"   at a time.
  132. 5065 say"enter multiple jumps one jump at a time."
  133. 5100 print"   press return[146] to start the game.
  134. 5105 say"press return to start the game."
  135. 5110 [161]a$:[139]a$[178]""[137]5110
  136. 5120 [137]1
  137. 5800 [153]"":[129]i[178]1[164]7[169]2:z[178]i[172]10
  138. 5840 [153][163]4)ma$(bd%(z[170]2));[163]10)ma$(bd%(z[170]4));[163]16)ma$(bd%(z[170]6));
  139. 5860 [153][163]22)ma$(bd%(z[170]8)):[153]""
  140. 5880 [153][163]1)ma$(bd%(z[170]11));[163]7)ma$(bd%(z[170]13));[163]13)ma$(bd%(z[170]15));
  141. 5900 [153][163]19)ma$(bd%(z[170]17)):[139]i[178]5[167][153]"on";
  142. 5910 [139]z[178]70[167][142]
  143. 5920 [153]"":[130]
  144. 6000 jf[178]0:[129]n[178]1[164]32:p[178]xy%(n):[139]bd%(p)[179][177]5[175]bd%(p)[179][177]6[137]6099
  145. 6005 [139]p[179]29[137]6030
  146. 6007 [129]k[178][171]11[164][171]9[169]2
  147. 6010 [139](bd%(p[170]k)[178]3[176]bd%(p[170]k)[178]4)[175](bd%(p[170]k[170]k)[178]2)[167]jf[178]jf[170]1:nm(jf)[178]p:d(jf)[178]k
  148. 6020 [130]
  149. 6030 [139]bd%(p)[179][177]6[137]6099
  150. 6035 [139]p[177]69[137]6099
  151. 6037 [129]k[178]9[164]11[169]2
  152. 6040 [139](bd%(p[170]k)[178]3[176]bd%(p[170]k)[178]4)[175](bd%(p[170]k[170]k)[178]2)[167]jf[178]jf[170]1:nm(jf)[178]p:d(jf)[178]k
  153. 6050 [130]
  154. 6099 [130]:[142]
  155. 6200 jf[178]0:[129]n[178]1[164]32:p[178]xy%(n):[139]bd%(p)[179][177]3[175]bd%(p)[179][177]4[137]6299
  156. 6205 [139]p[177]69[137]6230
  157. 6210 [129]k[178]9[164]11[169]2
  158. 6220 [139](bd%(p[170]k)[178]5[176]bd%(p[170]k)[178]6)[175]bd%(p[170]k[170]k)[178]2[167]jf[178]jf[170]1:nm(jf)[178]p:d(jf)[178]k
  159. 6225 [130]
  160. 6230 [139]bd%(p)[179][177]4[137]6299
  161. 6235 [139]p[179]39[137]6299
  162. 6240 [129]k[178][171]11[164][171]9[169]2
  163. 6250 [139](bd%(p[170]k)[178]5[176]bd%(p[170]k)[178]6)[175](bd%(p[170]k[170]k)[178]2)[167]jf[178]jf[170]1:nm(jf)[178]p:d(jf)[178]k
  164. 6260 [130]
  165. 6299 [130]:[142]
  166. 6500 cs[178]cs[170]1:w$[178]"i win!!!":[153]"";
  167. 6505 [129]i[178]1[164]7:[153][163]v)b$:[130]:[153]"ononononononon";
  168. 6507 [153][163]v)""w$:sayw$:[153][163]v)"score:":say"the scores are."
  169. 6510 [153][163]v)"you:";ps:[153][163]v)"pet:";cs
  170. 6520 [129]x[178]1[164]3000:[130]
  171. 6522 [151]792,207:[151]793,2:[151]53280,6:[151]53281,6
  172. 6525 [153]"load  do you want to play again ?":say"do you want to play again."
  173. 6530 [161]a$:[139]a$[178]""[137]6530
  174. 6540 [139]a$[178]"n"[167]8500
  175. 6550 [153]"";:[129]i[178]1[164]15:[153][163]v)b$:[130]:f[178]1:[137]1
  176. 6600 ps[178]ps[170]1:w$[178]"you win!!!":[153]"":[137]6505
  177. 6610 [153]"":[137]6505
  178. 7000 w1$[178]"no checker on":w2$[178]"that square.":[137]7050
  179. 7005 w1$[178]"that is an":w2$[178]"illegal move.":[137]7050
  180. 7010 w1$[178]"i occupy":w2$[178]"that square.":[137]7050
  181. 7015 w1$[178]"you must take":w2$[178]"your jump.":[137]7050
  182. 7020 w1$[178]"you occupy":w2$[178]"that square.":[137]7050
  183. 7030 w1$[178]"not a":w2$[178]"valid square.":[137]7050
  184. 7040 w1$[178]"that is a":w2$[178]"white square."
  185. 7050 [153][163]v)w1$:[153][163]v)w2$:sayw1$:sayw2$:[129]i[178]1[164]e:[130]
  186. 7070 [141]5800:[153]"";:[129]j[178]1[164]6:[153][163]v)b$:[130]:[137]290
  187. 8000 [153]"load":[151]743,169
  188. 8005 [151]720,8:[151]739,54:[151]744,53:[151]749,50:[151]754,50:[151]758,169
  189. 8010 [139][194](49153)[179][177]187[167][151]53280,6:[151]53281,6
  190. 8015 [139][194](49153)[179][177]187[167][153][163]8);"  loading sub programs  wait"
  191. 8020 [139][194](49153)[179][177]187[167][147]"sam",8,1
  192. 8030 [158]38144:[151]52,125:[151]54,125:[151]56,125:[151]792,207:[151]793,2
  193. 8040 ]re:]li 1:]pi 70:]sp 70:]kn 150,150
  194. 8050 [142]
  195. 8500 [153]"load  do you want to return to war games ?":x$[178]""
  196. 8505 say"do you want to return to war games."
  197. 8510 [161]x$:[139]x$[178]""[167]8510
  198. 8520 [139]x$[178]"n"[167][153]"load  bye bye":say"bye bye.":[128]
  199. 8540 [153]"loadload";[199](34);"war menu";[199](34);",8,1"
  200. 8550 [151]631,19:[151]632,13:[151]633,82:[151]634,117:[151]635,13:[151]198,5:[128]
  201.