home *** CD-ROM | disk | FTP | other *** search
/ Tiger Disk 21 / Tiger_Disk_021_19xx_Tiger-Crew-Disk_de_Side_C.d64 / 6.c64 (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  4KB  |  134 lines

  1. 0 poke45,182:poke46,23:clr
  2. 1 poke53281,0:poke53280,5:print"[155]"chr$(142):goto1800
  3. 2 poke198,0:wait198,1:geti$:ia=asc(i$):return
  4. 100 ifr<ththenx=8:y=10:gosub3100:print"> only[146]"
  5. 110 ifr<5theny=9:x=7:gosub3100:ml=ml-1:printml"move [157]";:ifml-1thenprint"s"
  6. 115 ifr<1orml<1then5000
  7. 120 y=21:x=1:gosub3100:printc$:gosub3100:ifp=cthenprintp$(p):goto1000
  8. 125 printp$(p)" (a-l)?"
  9. 135 forq=0to11:w(q)=m(q):next:gosub2:ifi$<>"x"then160
  10. 150 forq=.to11:w(q)=l(q):next:gosub2990:pokesc,12
  11. 152 poke198,0:wait198,1:ifpeek(197)-23then152
  12. 155 forq=.to11:w(q)=m(q):next:gosub2990:pokesc,0:goto135
  13. 160 m=asc(i$)-65:ifm<.orm>11then135
  14. 161 ifm(m)then167
  15. 162 forqx=1to10step.2:gosub3100:ifqxand1thenprintc$:goto164
  16. 163 print"empty pit!"
  17. 164 next:goto120
  18. 167 gosub3200:ifr<13thend=1:forq=1to200:next:goto900
  19. 170 y=21:x=1:gosub3100:print"which way?         "
  20. 175 gosub10000
  21. 180 getd$:ifd$=""then180
  22. 190 d=asc(d$)-45:ifabs(d)-1then180
  23. 900 b=1:gosub3200:forq=.to11:l(q)=m(q):w(q)=m(q):next:gosub3300:r=r-s:s(p)=s(p)+s
  24. 905 forq=0to11:m(q)=w(q):next:x=13:y=18:gosub3100:printi$chr$(d+61)s"[157] "
  25. 910 x=17:y=19:gosub3100:i$=mid$(str$(r),2):x=20-len(i$):print"   "
  26. 920 gosub3100:printi$:i$=mid$(str$(s(p)),2):x=18-len(i$):y=2+p:gosub3100:printi$
  27. 930 ifs(p)>wthen5000
  28. 980 p=2+notp:b=.:goto100
  29. 1000 bs=-9e9:forg=0to23+tw*(r<th):d=1:y=g:ifg>ethend=-1:y=g-tw
  30. 1006 ifm(y)=.then1090
  31. 1010 forv=.toe:w(v)=m(v):next:m=y:gosub3300:ifs<=bsthen1090
  32. 1025 o=.:cs=.:cr=.:ifezthen1080
  33. 1030 w(tw)=w(.):w(th)=w(1):forv=.to11:c1=w(v):ifc1and1thenifc1<7then1040
  34. 1035 goto1075
  35. 1040 cs=cs+c1:c2=w(v+1):ifc2and1thenifc2<7then1050
  36. 1045 goto1075
  37. 1050 o=o+c2:c3=w(v+2):ifc3and1thenifc3<7thencr=cr+c1+c2+c3
  38. 1075 next
  39. 1080 t=s-cr*fr-cs*fs-o*f2:ift>bsthenbs=t:bm=y:bd=d
  40. 1090 next:d=bd:m=bm:i$=chr$(m+65):gosub10000:goto900
  41. 1800 l1=1309:l$="000003006009091171249246243240158078":mk=249
  42. 1810 dimn$(1),p$(1),w(13),m(11),l(11):c$="                  "
  43. 1820 di=54272:ml=9:e=11:tw=12:th=13:fr=.18:fs=.18:sc=53281:vo=54296
  44. 1825 f2=.01:ifpeek(657)=0thennew:
  45. 1830 gosub6000
  46. 1900 print"play me? y[157]";:c=1
  47. 1910 gosub2:ifi$="y"oria=13theni$="y":printi$:goto1950
  48. 1915 ifi$<>"n"then1910
  49. 1917 printi$
  50. 1918 n$(0)="player 1":n$(1)="player 2"
  51. 1926 print:input"name of player one";n$(0):c=-1
  52. 1930 print:input"name of player two";n$(1)
  53. 1935 forq=0to1:n$(q)=left$(n$(q),10):p$(q)=n$(q):next:goto1965
  54. 1950 n$(0)="you":n$(1)="me":print:print"do you want to go first? y[157]";
  55. 1951 p$(0)="your move":p$(1)="thinking"
  56. 1952 gosub2:ifi$="y"oria=13theni$="y":p=0:goto1960
  57. 1954 ifi$<>"n"then1952
  58. 1956 p=1
  59. 1960 printi$:print:print"e[146]asy or h[146]ard? h[157]";
  60. 1961 ez=1:gosub2:ifi$="h"oria=13theni$="h":ez=0:goto1963
  61. 1962 ifi$<>"e"then1961
  62. 1963 printi$
  63. 1965 print:print"how many stones? 6[157]";:d$=""
  64. 1972 gosub2:ifia=13thenifd$=""theni$="6"
  65. 1973 ifi$<"0"ori$>"9"then1972
  66. 1974 printi$;:d$=d$+i$:x=val(d$):ifx<2then1972
  67. 1980 forq=0to11:m(q)=x:w(q)=x:next:r=x*12:w=r/2
  68. 1987 print"[147]     score:
  69. 1989 [129]q[178]0[164]1:[153][163]15[171][195](n$(q)))n$(q)"  0":[130]:[153]
  70. 2010 [153]"      a  b  c  d"
  71. 2020 [153]"     tototototototototototo"
  72. 2030 [153]"    (NULL)"[166]11)"(NULL)"
  73. 2040 [153]"   (NULL)"[166]13)"(NULL)"
  74. 2050 [153]" lthen"[166]15)"fne"
  75. 2060 [153]"  then"[166]15)"fn"
  76. 2070 [153]" kthen"[166]15)"fnf"
  77. 2080 [153]"   (NULL)"[166]13)"(NULL)"
  78. 2090 [153]"    (NULL)"[166]11)"(NULL)"
  79. 2100 [153]"     tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab("
  80. 2110 [153]"      j  i  h  g"
  81. 2120 b[178]0:[141]2990
  82. 2130 [153]:[153]:[153][163]7)"move:":[153][163]7)"remaining:"
  83. 2200 q[178]23:[153]""
  84. 2210 [153][163]q)" <<<      >>> "
  85. 2220 [153][163]q)"v   ^    ^   v"
  86. 2230 [153][163]q)"v <wait ^    ^ >wait v"
  87. 2240 [153][163]q)"v   ^    ^   v"
  88. 2250 [153][163]q)" >>>      <<< "
  89. 2299 [153]
  90. 2300 [153][163]22)"holdwait [x] key for
  91. 2310 printtab(22)"previous board.
  92. 2400 [153]""[163]22)" m a n c a l a wait"
  93. 2900 [137]100
  94. 2990 [129]m[178].[164]11:[141]3000:[130]:[142]
  95. 3000 l[178]l1[170][197]([202](l$,3[172]m[170]1,3)):j[178][181](w(m)[173]10)[170]48:[139]j[178]48[167]j[178]32
  96. 3010 [151]l,j:[151]l[170]di,1:[151]l[170]1,w(m)[171]10[172][181](w(m)[173]10)[170]48:[151]l[170]1[170]di,1:[142]
  97. 3100 [153]"";:[139]y[177]0[167][129]q[178]1[164]y:[153]"";:[130]
  98. 3120 [153][163]x);:[142]
  99. 3200 l[178]l1[170][197]([202](l$,3[172]m[170]1,3)):[129]l[178]l[164]l[170]1
  100. 3210 j[178][194](l):[139]j[179][177]32[167][151]l,j[171](j[179]128)[172]128[170](j[177]128)[172]128
  101. 3220 [130]:[142]
  102. 3300 k[178]w(m):w(m)[178]0:[139]b[167][141]3000
  103. 3310 [129]q[178]1[164]k:m[178]m[170]d:[141]3390:w(m)[178]w(m)[170]1:[139]b[167][141]3000
  104. 3320 [130]:c1[178]w(m):s[178].:[139]c1[175]mk[167][142]
  105. 3330 s[178]c1:w(m)[178].:[139]b[167][141]3000
  106. 3340 m[178]m[171]d:[141]3390:c1[178]w(m):[139]c1[175]mk[167][142]
  107. 3345 [139]c1[178].[167][142]
  108. 3350 m1[178]m:m[178]m[171]d:[141]3390:c2[178]w(m):[139]c2[175]mk[167][142]
  109. 3355 [139]c2[178].[167][142]
  110. 3360 w(m)[178].:w(m1)[178].:s[178]s[170]c1[170]c2:[139]b[167][141]3000:m[178]m1:[141]3000
  111. 3370 [142]
  112. 3390 [139]m[179]0[167]m[178]e:[142]
  113. 3392 [139]m[177]11[167]m[178]0
  114. 3394 [142]
  115. 5000 [151]sc,214:x[178]1:y[178]21:[141]3100:[153]c$:[141]3100
  116. 5010 [139]s(0)[178]s(1)[167][153]"tie game!":[137]5050
  117. 5020 p[178]1:[139]s(0)[177]s(1)[167]p[178]0
  118. 5030 [139]c[178][171]1[167][153]n$(p)" wins!":[137]5050
  119. 5040 n$(1)[178]"i":[153]n$(p)" win!"
  120. 5050 [153]"[r]un";
  121. 5090 [161]i$:[139]i$[179][177]"r"[167]5090
  122. 5095 [151]sc,27:[138]
  123. 6000 [153]"load":x[178]12
  124. 6100 [153][163]x)"for(NULL)               (NULL)"
  125. 6110 [153][163]x)" waitsys (NULL)(NULL)(NULL)(NULL)(NULL)(NULL)(NULL)(NULL)(NULL)(NULL)(NULL)(NULL)(NULL) for "
  126. 6120 [153][163]x)" waitclr m a n c a l a for "
  127. 6130 [153][163]x)" waitsys usrusrusrusrusrusrusrusrusrusrusrusrusr for "
  128. 6140 [153][163]x)"for(NULL)               (NULL)"
  129. 6200 [153]"print#    copyright (c) 1982 bruce robinson"
  130. 6210 x[178]13:[153][163]x)"victory software":[153][163]x)"paoli, pa  19301"
  131. 6999 x[178]0:[142]
  132. 10000 [151]vo,15:a8[178]54272:[151]a8,30:[151]a8[170]1,30:[151]a8[170]5,15:[151]a8[170]6,240
  133. 10002 [151]a8[170]4,17:[129]em[178]1[164]200:[130]:[151]a8[170]4,16:[151]vo,0:[142]
  134.