home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun: Strategy Games 2 / rerun-strategygamesII.d64 / duo (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  10KB  |  281 lines

  1. 2 printchr$(147)"would you like instructions (y/n)?
  2. 4 [161] a$: [139] a$[179][177] "y" [175] a$[179][177]"n" [167] 4
  3. 6 [139] a$[178]"n" [167] 92
  4. 8 [153]"instructions on screen or printer (s/p)?
  5. 10 get b$: if b$<> "s" and b$<>"p" then 10
  6. 12 if b$="s"then  d=3
  7. 14 if b$="p" then d=4
  8. 16 open d,d
  9. 18 print#d,"
  10. 20 [152]d,"duo by robert cook
  11. 22 print#d,"run it right: c-64; joystick optional
  12. 24 [152]d,"
  13. 26 print#d,"the object of duo, adapted from the
  14. 28 [152]d,"popular game uno, is to score 100
  15. 30 print#d,"points. the playing deck has 100 cards;
  16. 32 [152]d,"eight each of 0 to 9 worth face value,
  17. 34 print#d,"skip a turn and draw 2 cards for 20
  18. 36 [152]d,"points each, plus four wild cards (50
  19. 38 print#d,"points) all but the wildcards are
  20. 40 [152]d,"colored.
  21. 42 print#d,"initially, each player gets six cards,
  22. 44 [152]d,"with one in the discard pile. to draw,
  23. 46 print#d,"move the pointer using the joystick or
  24. 48 [152]d,"the arrow keys. you must discard each
  25. 50 print#d,"turn. enter every play with the fire
  26. 52 [152]d,"button or the return key.":[139] d[178]4 [167] 64
  27. 54 [152]d,"
  28. 56 print"press a key to continue"
  29. 58 get dd$:if dd$="" then 58
  30. 60 print#d,"
  31. 62 [152]d,"
  32. 64 print#d,"
  33. 66 [152]d,"a discard must match the top card on
  34. 68 print#d,"the pile in color, number or action.
  35. 70 [152]d,"pick a color for a wildcard with any
  36. 72 print#d,"cursor key or joystick direction.
  37. 74 [152]d,"
  38. 76 print#d,"if you empty your hand, you score the
  39. 78 [152]d,"total of the computer's hand. if the
  40. 80 print#d,"computer accumulates 18 cards, you
  41. 82 [152]d,"score the difference between the values
  42. 84 print#d,"of the hands, yours being smaller. the
  43. 86 [152]d,"winner gets ten extra points. if the
  44. 88 print#d,"deck runs out, the hand ends with no
  45. 90 [152]d,"winner.":[160]d
  46. 92 [153]"press any key to begin the program..."
  47. 94 [161] e$:[139] e$[178]"" [167] 94
  48. 96 [156]
  49. 98 [143] * * duo 64 * * * v 1.0 * *              * * * robert b. cook * * *
  50. 100 [151]53280,11:[151]53281,1:[151]53265,11
  51. 102 [141]456:[141]544:[151]53265,27
  52. 104 [141]328
  53. 106 [151]646,4[171](pu[178]2)[172]4:[153]el$:[145]pu[141]116,210:[151]sp,0
  54. 108 [139]yc[178]0[176]mc[178]0[176]yc[177]17[176]mc[177]17[167][141]370:[137]104
  55. 110 [139]dp[178]100[167][141]300:[137]104
  56. 112 pu[178]3[171]pu:[137]106
  57. 114 :: you ::
  58. 116 [151]sx,30:[151]sy,218:[151]sp,1:mv[178]1:sk[178]0:[151]sb,0
  59. 118 [153][200](cr$,7)"clr(NULL)lay a card or str$raw the from deckwait":[141]310
  60. 120 [161]g$:js[178][194](56320)[175]31:[139]g$[178]""[175]js[178]31[167]120
  61. 122 [139]g$[178]"^"[176]js[178]30[167][151]sx,150:[151]sy,170:[151]sb,0:[137]120
  62. 124 [139]g$[178]""[176]js[178]23[167]mv[178]mv[170]1:[139]mv[177]yc[167]mv[178]1
  63. 126 [139]g$[178]""[176]js[178]27[167]mv[178]mv[171]1:[139]mv[179]1[167]mv[178]yc
  64. 128 [129]l[178]1[164]50:[130]:t[178]14[170]mv[172]16:t1[178]0:[139]t[177]255[167]t[178]t[171]255:t1[178]1
  65. 130 [139]g$[179][177][199](13)[175]js[179][177]15[167][151]sx,t:[151]sy,218:[151]sb,t1:[137]120
  66. 132 [153]el$
  67. 134 [139][194](sy)[178]170[167]yc[178]yc[170]1:yc(yc)[178]dk(dp):dp[178]dp[170]1:[141]164:[142]
  68. 136 [139]cv(yc(mv))[179][177]12[175]cv(yc(mv))[179][177]cv(uc)[175]cc$(yc(mv))[179][177]cc$(uc)[167]156
  69. 138 [153][200](cr$,15)[163]21)""[170]cd$(yc(mv))
  70. 140 [153][200](cr$,15)[163]21)cc$(yc(mv))[170]cd$(yc(mv))
  71. 142 uc[178]yc(mv):yc[178]yc[171]1:[139]yc[167][141]162:[137]146
  72. 144 [153][200](cr$,25)ec$;
  73. 146 [139]cv(uc)[178]12[175]yc[167][141]182
  74. 148 [139]cv(uc)[178]11[167][141]196
  75. 150 [139]cv(uc)[178]10[175]yc[167][141]202
  76. 152 [139]sk[178]1[175]yc[177]0[175]mc[179]18[175]dp[179]100[167]116
  77. 154 [142]
  78. 156 [153][200](cr$,7),"clrlenhoose another cardwait":[141]322
  79. 158 [129]l[178]0[164]999:[130]:[137]116
  80. 160 :: card ::
  81. 162 [129]l[178]mv[164]yc[170]1:yc(l)[178]yc(l[170]1):[130]:[137]170
  82. 164 [129]l[178]1[164]yc[171]1:[129]k[178]l[170]1[164]yc
  83. 166 [139]cv(yc(l))[179]cv(yc(k))[167]t[178]yc(l):yc(l)[178]yc(k):yc(k)[178]t
  84. 168 [130]:[130]
  85. 170 t[178]0:[129]l[178]1[164]yc
  86. 172 [139]l[179]19[167][153][200](cr$,21)[163](l[171]1)[172]2)cl$(t)[170]cc$(yc(l))[170]cd$(yc(l));
  87. 174 t[178]1:[130]:[139]yc[179]18[167][153]ee$;
  88. 176 [139]yc[178]19[167][153][200](cr$,15)[163]34)cc$(yc(19))[170]cd$(yc(19));
  89. 178 [142]
  90. 180 :: wild ::
  91. 182 [151]sp,0:t[178]0:[153][200](cr$,7)[163]13)"clrlenhoose a colorwait":[141]310
  92. 184 [161]g$:js[178][194](56320)[175]31:[139]g$[178]""[175]js[178]31[167]184
  93. 186 [139](g$[178][199](13)[176]js[178]15)[175]t[177]0[167][153]"clr"el$:[137]192
  94. 188 t[178]t[170]1[170](t[178]4)[172]4:t$[178][202]("defcontsys",t,1):wc$[178]t$:[153][200](cr$,15)[163]21)t$cd$(uc)
  95. 190 cc$(uc)[178]t$:[141]310:[137]184
  96. 192 [146]56320,16:[146]197,64:[142]
  97. 194 :: draw2 ::
  98. 196 [153][200](cr$,7)[163]12)"clrright$ take two cardswait":[141]310:[129]s[178]0[164]999:[130]
  99. 198 [129]j[178]1[164]2:[139]dp[179]100[167]mc[178]mc[170]1:mc(mc)[178]dk(dp):dp[178]dp[170]1:[141]262:[130]
  100. 200 [143]:: skip ::
  101. 202 [139]yc[178]0[176]mc[177]17[176]dp[177]99[167]206
  102. 204 [153][200](cr$,7),"clr(NULL)ou get another turnwait":[141]310:[129]s[178]0[164]999:[130]
  103. 206 sk[178][171](dp[179]100):[142]
  104. 208 :: computer ::
  105. 210 [153][200](cr$,7)[163]14)"forright$t's my turnwait":[141]316:[129]s[178]0[164]999:[130]
  106. 212 sk[178]0:mv[178]1:t[178]1
  107. 214 [129]l[178]1[164]mc:[139]cv(mc(l))[179]10[167]224
  108. 216 [139]cv(mc(l))[179][177]cv(uc)[175]cc$(mc(l))[179][177]cc$(uc)[176]cv(mc(l))[178]12[167]222
  109. 218 [129]k[178]l[170]1[164]mc:[139]cc$(mc(k))[178]cc$(mc(l))[176]cv(mc(k))[178]cv(mc(l))[167]mv[178]l:[137]236
  110. 220 [130]
  111. 222 t[178]l[170]1:[130]:[139]yc[179]3[167]t[178]1
  112. 224 [129]l[178]t[164]mc:[139]cv(mc(l))[178]cv(uc)[175]cv(mc(l))[179][177]12[175]mc(l)[167]mv[178]l:[137]236
  113. 226 [139]cc$(mc(l))[178]cc$(uc)[167]mv[178]l:[137]236
  114. 228 [130]:[139]t[179][177]1[167]t[178]1:[137]224
  115. 230 [139]cv(mc(1))[178]12[167]mv[178]1:[137]236
  116. 232 [153][200](cr$,7)[163]11)"for right$'ll draw a card wait":[141]316:[129]s[178]0[164]999:[130]
  117. 234 mc[178]mc[170]1:mc(mc)[178]dk(dp):dp[178]dp[170]1:[141]262:[142]
  118. 236 [153][200](cr$,7)[163]11)"for right$'ll play a card wait":[141]316:[129]s[178]0[164]999:[130]
  119. 238 [139]yc[178]1[175]cv(mc(1))[178]12[167]mv[178]1
  120. 240 [153][200](cr$,15)[163]21)""[170]cd$(mc(mv));
  121. 242 [153][200](cr$,15)[163]21)cc$(mc(mv))[170]cd$(mc(mv));
  122. 244 uc[178]mc(mv):mc[178]mc[171]1:[139]mc[167][141]260:[137]248
  123. 246 [153][200](cr$,13)ec$
  124. 248 [139]cv(uc)[178]12[175]mc[167][141]274
  125. 250 [139]cv(uc)[178]11[167][141]286
  126. 252 [139]cv(uc)[178]10[175]yc[167][141]292
  127. 254 [139]sk[178]1[175]mc[177]0[175]yc[179]18[175]dp[179]100[167]212
  128. 256 [142]
  129. 258 :: card ::
  130. 260 [129]l[178]mv[164]mc[170]1:mc(l)[178]mc(l[170]1):[130]:[137]268
  131. 262 [129]l[178]1[164]mc[171]1:[129]k[178]l[170]1[164]mc
  132. 264 [139]cv(mc(l))[179]cv(mc(k))[167]t[178]mc(l):mc(l)[178]mc(k):mc(k)[178]t
  133. 266 [130]:[130]
  134. 268 [139]mc[179]19[167][153][200](cr$,9)[163](mc[171]1)[172]2)bk$;:[139]mc[179]18[167][153]ee$;
  135. 270 [142]
  136. 272 :: wild ::
  137. 274 t1[178]0:t$[178]"":[129]l[178]1[164]4:t[178]0:[129]k[178]1[164]mc
  138. 276 [139]cc$(mc(k))[178][202]("defcontsys",l,1)[167]t[178]t[170]1
  139. 278 [130]:[139]t[177]t1[167]t1[178]t:t$[178][202]("defcontsys",l,1)
  140. 280 [130]:[139]t$[178]""[167]t$[178][202]("defcontsys",[181]([187](1)[172]4[170]1),1)
  141. 282 [153][200](cr$,15)[163]21)t$[170]cd$(uc):cc$(uc)[178]t$:[142]
  142. 284 :: draw2 ::
  143. 286 [153][200](cr$,7)[163]11)"for(NULL)ou take two cardswait":[141]316:[129]s[178]0[164]999:[130]
  144. 288 [129]j[178]1[164]2:[139]dp[179]100[167]yc[178]yc[170]1:yc(yc)[178]dk(dp):dp[178]dp[170]1:[141]164:[130]
  145. 290 [143]:: skip ::
  146. 292 [139]mc[178]0[176]yc[177]17[176]dp[177]99[167]296
  147. 294 [153][200](cr$,7)[163]11)"forright$ get another turnwait":[141]316:[129]s[178]0[164]999:[130]
  148. 296 sk[178][171](dp[179]100):[142]
  149. 298 :: [128] deck ::
  150. 300 [153][200](cr$,19)[163]14)ec$:[153][200](cr$,7)"open"el$
  151. 302 [153][200](cr$,7)[163]7)"(NULL)o more cards, hand dumped"
  152. 304 [129]l[178]1[164]6:[141]316:[141]310:[130]
  153. 306 [141]416:[142]
  154. 308 :: beep ::
  155. 310 [151]sr,240:[151]wv,17:[151]hf,50:[151]lf,35:[151]at,0
  156. 312 [129]s[178]1[164]99:[130]:[151]wv,16:[151]sr,0:[142]
  157. 314 :: boop ::
  158. 316 [151]vl,15:[151]at,0:[151]sr,225:[151]wv,17:[151]hf,33:[151]lf,33
  159. 318 [129]s[178]1[164]99:[130]:[151]wv,16:[142]
  160. 320 :: buzz ::
  161. 322 [151]hf,5:[151]at,0:[151]sr,240:[151]wv,33
  162. 324 [129]s[178]1[164]500:[130]:[151]wv,32:[142]
  163. 326 ::