home *** CD-ROM | disk | FTP | other *** search
- 2 printchr$(147)"would you like instructions (y/n)?
- 4 [161] a$: [139] a$[179][177] "y" [175] a$[179][177]"n" [167] 4
- 6 [139] a$[178]"n" [167] 88
- 8 [153]"instructions on screen or printer (s/p)?
- 10 get b$: if b$<> "s" and b$<>"p" then 10
- 12 if b$="s"then d=3
- 14 if b$="p" then d=4
- 16 open d,d
- 18 print#d,"
- 20 [152]d,"yatzy by robert cook
- 22 print#d,"run it right: c-64; joystick
- 24 [152]d,"
- 26 print#d,"in this 4 player game, you get three
- 28 [152]d,"rolls of the dice to make a hand.
- 30 print#d,"using a joystick in port 2, point the
- 32 [152]d,"hand at each die you want to reroll
- 34 print#d,"then fire. when you're ready, point
- 36 [152]d,"at "[199](34)"roll"[199](34)" and press fire again.
- 38 print#d,"cancel your selections with "chr$(34)"undo"chr$(34)". if
- 40 [152]d,"you like the first or second roll, just
- 42 print#d,"roll again.
- 44 [152]d,"
- 46 print#d,"the upper score area lists the numbers
- 48 [152]d,"on a die. the lower lists poker hands.
- 50 print#d,"above, a score is the number listed
- 52 [152]d,"times its frequency in the roll, and
- 54 print#d,"there's a bonus for totals of 63 or
- 56 [152]d,"more. below, a full house, small and
- 58 print#d,"large straights, and yatzy earn fixed
- 60 [152]d,"scores. three and four of a kind and
- 62 print#d,"chance (a catch-all) total all five
- 64 [152]d,"dice.":[139] d[178]4 [167] 74
- 66 [153]"press any key to continue"
- 68 [161] dd$:[139] dd$[178]"" [167] 68
- 70 [152]d,"
- 72 print#d,"
- 74 [152]d,"
- 76 print#d,"each turn, choose the unused category
- 78 [152]d,"that will score the most. if you use
- 80 print#d,"an inappropriate category, you score
- 82 [152]d,"zero. play ends when everyone has used
- 84 print#d,"all categories.
- 86 [152]d,"":[160]d
- 88 [153]"press any key to begin the program..."
- 90 [161] e$:[139] e$[178]"" [167] 90
- 92 [156]
- 94 [143] yatzy - robert b. cook
- 96 [141]376:[141]408:[141]322
- 98 [141]110:[141]170
- 100 [141]198:[141]282
- 102 c1[178]c1[170]1:[139]c1[178]np[172]13[167]310
- 104 pl[178]pl[170]1:[139]pl[177]np[167]pl[178]1
- 106 [137]98
- 108 [178] start [178]
- 110 [153]"waitstop"[163]58)[200]("sgnstop#1 sgnstop#2 sgnstop#3 sgnstop#4 int",np[172]6[170]2)
- 112 [153]""[163]54[170]pl[172]4)" #"[202]([196](pl),2)" waitsgn"
- 114 rl[178]1:[153]dn$[163]36)"on"rn$(1)
- 116 [129]l1[178]1[164]5:[151]2040[170]l1,200:di(l1)[178]0:[130]:[151]sp[170]21,62
- 118 [141]126:[139]rl[178]4[167][142]
- 120 [141]150:[139]rd[177]0[167]118
- 122 [142]
- 124 [178] roll dice [178]
- 126 [129]l1[178]1[164]5
- 128 [139]di(l1)[178]0[167]dn(l1)[178][181]([187](1)[172]6[170]1)
- 130 [130]
- 132 [129]l1[178]1[164]5:[139]di(l1)[178]1[167]142
- 134 t1[178][181]([187](1)[172]6[170]1)
- 136 [151]wv,129:[151]lf,85:[151]hf,36
- 138 [151]2040[170]l1,192[170]t1:[129]l2[178]1[164]25:[130]:[151]wv,128
- 140 di(l1)[178]1:[139]t1[179][177]dn(l1)[167]134
- 142 [130]
- 144 rl[178]rl[170]1:[139]rl[179]4[167][153]dn$[163]36)"on"rn$(rl)
- 146 [142]
- 148 [178] choose dice [178]
- 150 [151]sp[170]1,92:[151]sp[170]21,63:rd[178]0:t1[178]1
- 152 js[178][194](56320)[175]31:[139]js[178]31[167]152
- 154 [139]js[178]15[175]t1[178]0[167][129]l1[178]1[164]5:[151]2040[170]l1,192[170]dn(l1):di(l1)[178]1:[130]:rd[178]0
- 156 [139]js[178]15[175]t1[178]6[167]166
- 158 [139]js[178]15[175]t1[177]0[167][151]2040[170]t1,200:rd[178]rd[170]1:di(t1)[178]0
- 160 [139]js[178]29[167]t1[178]t1[170]1:[139]t1[177]6[167]t1[178]6
- 162 [139]js[178]30[167]t1[178]t1[171]1:[139]t1[179]0[167]t1[178]0
- 164 [151]sp[170]1,68[170]24[172]t1:[129]l1[178]1[164]99:[130]:[137]152
- 166 [146]56320,16,15:[142]
- 168 [178] choose line [178]
- 170 [151]sp[170]21,254
- 172 ln[178]1:[151]sp[170]15,86
- 174 js[178][194](56320)[175]31:[139]js[178]31[167]174
- 176 [139]js[178]15[175]mx(pl,ln)[178]0[167][142]
- 178 [139]js[178]15[167][141]304
- 180 [129]l1[178]1[164]99:[130]:[139]js[178]30[167]190
- 182 [139]js[179][177]29[167]174
- 184 ln[178]ln[170]1:[139]ln[178]7[167]ln[178]11
- 186 [139]ln[177]17[167]ln[178]1
- 188 [137]194
- 190 ln[178]ln[171]1:[139]ln[178]10[167]ln[178]6
- 192 [139]ln[179]1[167]ln[178]17
- 194 [151]sp[170]15,78[170]ln[172]8:[137]174
- 196 [178] calculate [178]
- 198 sc[178]0:mx(pl,ln)[178]1
- 200 [145][171](ln[179]7)[137]204:[137]218
- 202 [178] upper [178]
- 204 [129]l1[178]1[164]5
- 206 [139]dn(l1)[178]ln[167]sc[178]sc[170]ln
- 208 [130]
- 210 sc(pl,1)[178]sc(pl,1)[170]sc:[139]sc(pl,1)[177]62[167]sc(pl,2)[178]35
- 212 sc(pl,3)[178]sc(pl,1)[170]sc(pl,2):sc(pl,5)[178]sc(pl,3)[170]sc(pl,4)
- 214 [142]
- 216 [178] lower [178]
- 218 t1[178]0:t2[178]0:sc[178]0
- 220 [129]l1[178]1[164]6:ct(l1)[178]0:[130]
- 222 [129]l1[178]1[164]5:t2[178]t2[170]dn(l1):[129]l2[178]1[164]6
- 224 [139]dn(l1)[178]l2[167]ct(l2)[178]ct(l2)[170]1
- 226 [130]:[130]
- 228 [145]ln[171]10[141]236,236,246,258,258,270,278
- 230 sc(pl,4)[178]sc(pl,4)[170]sc:sc(pl,5)[178]sc(pl,3)[170]sc(pl,4)
- 232 [142]
- 234 [172] 3 [176] 4 of a kind [172]
- 236 [129]l1[178]1[164]6
- 238 [139]ln[178]11[175]ct(l1)[177]2[167]sc[178]t2
- 240 [139]ln[178]12[175]ct(l1)[177]3[167]sc[178]t2
- 242 [130]:[142]
- 244 [172] full house [172]
- 246 [129]l1[178]1[164]6
- 248 [139]ct(l1)[178]2[167]t1[178]t1[170]2
- 250 [139]ct(l1)[178]3[167]t1[178]t1[170]3
- 252 [139]t1[178]5[167]sc[178]25
- 254 [130]:[142]
- 256 [172] small straight [176] large straight [172]
- 258 [129]l1[178]1[164]6
- 260 t1[178]t1[170]1:[139]ct(l1)[178]0[167]t1[178]0
- 262 [139]ln[178]14[175]t1[178]4[167]sc[178]30
- 264 [139]ln[178]15[175]t1[178]5[167]sc[178]40
- 266 [130]:[142]
- 268 [172] yatzy [172]
- 270 [129]l1[178]1[164]6
- 272 [139]ct(l1)[178]5[167]sc[178]50
- 274 [130]:[142]
- 276 [172] chance [172]
- 278 sc[178]t2:[142]
- 280 [178] [153] [178]
- 282 [151]646,0:[139]ln[178]16[167][151]646,4
- 284 [153][200](dn$,ln[170]4)[163]19[170](4[172](pl[171]1)))[201](" "[170][196](sc),3)
- 286 [141]298
- 288 [129]l[178]1[164]5:t[178][197]([202]("01112132224",l[172]2,2))
- 290 [151]646,1:[139]l[178]2[167][151]646,2
- 292 [153][200](dn$,t)[163]19[170](4[172](pl[171]1)))[201](" "[170][196](sc(pl,l)),3)
- 294 [130]:[151]sp[170]21,62:[142]
- 296 [178] blip [178]
- 298 [151]sr,240:[151]wv,17:[151]hf,50:[151]lf,35
- 300 [129]l1[178]1[164]99:[130]:[151]wv,16:[151]sr,0:[142]
- 302 [178] buzz [178]
- 304 [151]sr,240:[151]wv,33:[151]hf,5
- 306 [129]l1[178]1[164]150:[130]:[151]wv,32:[142]
- 308 [178] [128] game [178]
- 310 [151]sp[170]21,0:[151]829,234
- 312 [153]" press fire "
- 314 [129]l1[178]1[164]np:hs[178]sc(l1,5):[139]hs[179][178][194](829[170]l1[172]2)[172]256[170][194](830[170]l1[172]2)[167]318
- 316 [151]829[170]l1[172]2,hs[173]256:[151]830[170]l1[172]2,(hs[173]256[171][181](hs[173]256))[172]256
- 318 [130]:[146]56320,16,16:[146]56320,16,15:[138]
- 320 [178] screen [178]
- 322 [153]"loadabs ortan^ortan^ortan^ortan^ortan^ wait(NULL)usrusrusr(NULL)usrusrusr(NULL)usrusrusr(NULL)usrusrusrintsys "
- 324 [153]"abs (NULL)y(NULL)(NULL)a(NULL)(NULL)t(NULL)(NULL)z(NULL)(NULL)y(NULL) waitsgn sgn sgn sgn intsys "
- 326 [153]"abs /tanexp/tanexp/tanexp/tanexp/tanexp wait(NULL)andandand(NULL)andandand(NULL)andandand(NULL)andandandintsysundo"
- 328 [153]"abscont high score waitfn fn fn fn intsysusrusrusrusr
- 330 print"[182][144]aces........[165][144]add [165] [165] [165] [165] [181]
- 332 [153]"absstopdeuces......fnstopadd fn fn fn fn int
- 334 print"[182][144]threes......[165][144]add [165] [165] [165] [165] [181]
- 336 [153]"absstopfours.......fnstopadd fn fn fn fn int
- 338 print"[182][144]fives.......[165][144]add [165] [165] [165] [165] [181]
- 340 [153]"absstopsixes.......fnstopadd fn fn fn fn int
- 342 print"[182] sub total [146][165] [165] [165] [165] [181]
- 344 [153]"abs bonus (63) waitfn=35 fn fn fn fn int
- 346 print"[182] total upper [146][165] [165] [165] [165] [181]
- 348 [153]"absusrusrusrusrusrusrusrusrusrusrusrusr(NULL)usrusrusrusr(NULL)usrusrusr(NULL)usrusrusr(NULL)usrusrusr(NULL)usrusrusrint
- 350 print"[182][144]3 of a kind.[165][144]add [165] [165] [165] [165] [181]
- 352 [153]"absstop4 of a kind.fnstopadd fn fn fn fn int
- 354 print"[182][144]full house..[165][144]=25 [165] [165] [165] [165] [181]
- 356 [153]"absstopsm straight.fnstop=30 fn fn fn fnclose int
- 358 print"[182][144]lg straight.[165][144]=40 [165] [165] [165] [165] [181]
- 360 [153]"absclryatzy waitfnclr=50 fn fn fn fn intforandandandand
- 362 print"[182][144]chance......[165][144]add [165] [165] [165] [165] [181][129]roll
- 364 [153]"abs total lower waitfn fn fn fn intfor(NULL)usrusr(NULL)
- 366 print"[182][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][146][207][183][183][183][207][183][183][183][207][183][183][183][207][183][183][183][181][129][165] [170]
- 368 [153]"abs grand total waitfn fn fn fn intforfn then
- 370 print"[182] [146][181][129][204][175][175][186][154]
- 372 [129]l1[178]1[164]np:[153]"cont"[163]15[170]l1[172]4)[201](" "[170][196](hs(l1)),3);:[130]:[142]
- 374 [178][178][178][178][178][178][178][178][178][178] o p t i o n s [178][178][178][178][178][178][178][178][178][178][178]
- 376 [151]53281,15:[151]53280,15:np[178]1
- 378 [153]"loadclr ortantantan^ortantantan^ortantantan^ortantantan^ortantantan^
- 380 print" [221][223][223][146][169][221][221][190][185][188][146][221][221][162] [162][146][221][221][162][187][146][169][221][221][223][223][146][169][221]
- 382 [153]" (NULL) wait (NULL)(NULL) waitval wait(NULL)(NULL) wait(NULL)(NULL)steplogwaitnew(NULL)(NULL) wait (NULL)
- 384 print" [173][192][192][192][189][173][192][192][192][189][173][192][192][192][189][173][192][192][192][189][173][192][192][192][189]
- 386 [153]" press joystick [clrport 2] up or down
- 388 print" to change number of players
- 390 [153]" press verifyfire to play
- 392 print" how many players?[149]";
- 394 printtab(27)np"[157][157][157]";
- 396 js=peek(56320)and31:forl1=1to75:next
- 398 ifjs=30thennp=np+1:ifnp=5thennp=1
- 400 ifjs=29thennp=np-1:ifnp=0thennp=4
- 402 ifjs<>15then394
- 404 print"[147]":return
- 406 = initialize =
- 408 pl=1:sp=53248:r=rnd(-ti)
- 410 lf=54272:hf=54273:wv=54276:sr=54278
- 412 rn$(1)="[169][146][161][157][157][161][146][161]"
- 414 rn$(2)="[197] [157][157] [196]"
- 416 rn$(3)="[197] [157][157][196] "
- 418 dn$="
- 420 [134] di(5),mx(4,20),sc(4,5),hs(4)
- 422 [129]l1[178]lf[164]lf[170]24:[151]l1,0:[130]:[151]lf[170]24,15
- 424 [139][194](829)[178]234[167]430
- 426 [129]l1[178]0[164]511:[135]a:[151]12288[170]l1,a:[130]
- 428 [129]l1[178]512[164]575:[151]12288[170]l1,.:[130]:[151]830,0:[151]831,0
- 430 [129]l1[178]1[164]5:[151]sp[170]39[170]l1,1
- 432 [151]sp[170]2[172]l1,52:[151]sp[170]1[170]2[172]l1,60[170]l1[172]24:[143] color,x,y pos
- 434 [130]
- 436 [151]2040,192:[151]sp[170]39,9:[151]sp,30:[151]sp[170]1,212:[143] left
- 438 [151]2047,199:[151]sp[170]46,7:[151]sp[170]14,120:[151]sp[170]15,86:[143] right
- 440 [151]sp[170]16,127
- 442 [129]l1[178]1[164]np:hs(l1)[178][194](829[170]l1[172]2)[172]256[170][194](830[170]l1[172]2):[130]
- 444 [142]
- 446 [178] [254] [131] =
- 448 [172] lefth[175] [172]
- 450 [131]000,000,000,000,000,000,000,000
- 452 [131]096,000,000,224,000,001,192,000
- 454 [131]003,128,000,007,000,028,014,000
- 456 [131]014,061,192,007,123,064,007,118
- 458 [131]224,007,189,160,007,219,112,007
- 460 [131]222,208,007,221,176,003,255,096
- 462 [131]003,255,192,001,255,128,001,255
- 464 [131]000,001,254,000,003,252,000,000
- 466 [172] [145]e [172]
- 468 [131]255,255,255,255,255,255,255,255
- 470 [131]255,255,255,255,255,255,255,255
- 472 [131]255,255,255,255,255,255,255,255
- 474 [131]255,231,255,255,195,255,255,195
- 476 [131]255,255,231,255,255,255,255,255
- 478 [131]255,255,255,255,255,255,255,255
- 480 [131]255,255,255,255,255,255,255,255
- 482 [131]255,255,255,255,255,255,255,000
- 484 [172] two [172]
- 486 [131]255,255,255,255,255,255,255,255
- 488 [131]207,255,255,135,255,255,135,255
- 490 [131]255,207,255,255,255,255,255,255
- 492 [131]255,255,255,255,255,255,255,255
- 494 [131]255,255,255,255,255,255,255,255
- 496 [131]255,255,243,255,255,225,255,255
- 498 [131]225,255,255,243,255,255,255,255
- 500 [131]255,255,255,255,255,255,255,000
- 502 [172] three [172]
- 504 [131]255,255,255,255,255,255,255,255
- 506 [131]207,255,255,135,255,255,135,255
- 508 [131]255,207,255,255,255,255,255,255
- 510 [131]255,231,255,255,195,255,255,195
- 512 [131]255,255,231,255,255,255,255,255
- 514 [131]255,255,243,255,255,225,255,255
- 516 [131]225,255,255,243,255,255,255,255
- 518 [131]255,255,255,255,255,255,255,000
- 520 [172] four [172]
- 522 [131]255,255,255,255,255,255,243,255
- 524 [131]207,225,255,135,225,255,135,243
- 526 [131]255,207,255,255,255,255,255,255
- 528 [131]255,255,255,255,255,255,255,255
- 530 [131]255,255,255,255,255,255,255,255
- 532 [131]255,255,243,255,207,225,255,135
- 534 [131]225,255,135,243,255,207,255,255
- 536 [131]255,255,255,255,255,255,255,000
- 538 [172] five [172]
- 540 [131]255,255,255,255,255,255,243,255
- 542 [131]207,225,255,135,225,255,135,243
- 544 [131]255,207,255,255,255,255,255,255
- 546 [131]255,231,255,255,195,255,255,195
- 548 [131]255,255,231,255,255,255,255,255
- 550 [131]255,255,243,255,207,225,255,135
- 552 [131]225,255,135,243,255,207,255,255
- 554 [131]255,255,255,255,255,255,255,000
- 556 [172] six [172]
- 558 [131]255,255,255,255,255,255,243,255
- 560 [131]207,225,255,135,225,255,135,243
- 562 [131]255,207,255,255,255,255,255,255
- 564 [131]243,255,207,225,255,135,225,255
- 566 [131]135,243,255,207,255,255,255,255
- 568 [131]255,255,243,255,207,225,255,135
- 570 [131]225,255,135,243,255,207,255,255
- 572 [131]255,255,255,255,255,255,255,000
- 574 [172] righth[175] [172]
- 576 [131]000,000,000,000,000,000,006,000
- 578 [131]000,007,000,000,003,128,000,001
- 580 [131]192,000,000,224,000,000,112,056
- 582 [131]003,188,112,002,222,224,007,110
- 584 [131]224,005,189,224,014,219,224,011
- 586 [131]123,224,013,187,224,006,255,192
- 588 [131]003,255,192,001,255,128,000,255
- 590 [131]128,000,127,128,000,063,192,000
-