home *** CD-ROM | disk | FTP | other *** search
/ Tiger Disk 6 / Tiger_Disk_006_19xx_Tiger-Crew-Disk_de_Side_A.d64 / small-blackjack (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  7KB  |  117 lines

  1. 1 z=54294:pokez+2,15:pokez+3,24:j=rnd(-ti):k$="       press any key to go on[146]":l$="                                        [146]":m$="                      ":n$="[147] high rise or three card brag [146]":print"[147]":gosub4000:printn$:print"preamble(y/n)?":poke53280,4
  2. 4 poke53281,14
  3. 5 geta$:ifa$<>"y"anda$<>"n"then5
  4. 6 ifa$="n"thenn$="[147]":goto30
  5. 7 gosub4000:n$="[147]":printn$"the highest hand is 3 threes,followed bythree aces,three kings etc.":print"next best is a running flush (straight).first,ace two three,then ace king ";:print"queen,king queen jack,etc.":print""k$
  6. 11 geta$:ifa$=""then11
  7. 12 gosub4000:printn$"then come the ordinary runs in the same order as the straights":print"next best is a flush.first,the ace flushthen,king flush,queen flush..":print""k$
  8. 15 geta$:ifa$=""then15
  9. 16 gosub4000:printn$"after that come the pairs,a pair of aces being the highest":print"then a king pair & so on.":print"finally,the high card,starting with the ace.":print""k$
  10. 19 geta$:ifa$=""then19
  11. 20 gosub4000:printn$"you start with a stake of \1000.":print"if you lose it all, i win ":print"but,if you increase your stake to \10000  you win the game.":print""k$
  12. 22 geta$:ifa$=""then22
  13. 23 gosub4000:printn$"at the start of each hand both of us    must put \10 in the pot":print"after seeing your hand you can bet,pay  up & see me,or fold.if you do i win":print"the minimum bet is \10 but can be raised":print""k$
  14. 26 geta$:ifa$=""then26
  15. 27 gosub4000:printn$"the player with the best hand wins the  pot unless some ";:print"one has already folded.":print"if it's a draw,i win (hard luck!).":print""k$
  16. 29 geta$:ifa$=""then29
  17. 30 dimp(29),q(29):fora=0to29:readx,y:x=x+200:y=y+200:p(a)=x:q(a)=y:next:data1027,55299,1029,55301,1109,55381,1189,55461,1191,55463,1040,55312,1042,55314,1122,55394,1202,55474,1204,55476,1053,55325,1055,55327,1135,55407,1215,55487,1217,55489
  18. 39 data1507,55779,1509,55781,1589,55861,1669,55941,1671,55943,1520,55792,1522,55794,1602,55874,1682,55954,1684,55956,1533,55805,1535,55807,1615,55887,1695,55967,1697,55969:p$="[159]pot=\":s$="[159]stake=\":b$="[159]bet=\
  19. 49 [151]z[170]3,29:s[178]1000
  20. 50 [153]"load"l$:p[178]0:v[178]10:[153]"my hand.":[153]"  (NULL)tanlenlenlentanright$closeclose    (NULL)tanlenlenlentanright$      (NULL)tanlenlentantanright$":[153]" close(NULL)     (NULL)close     (NULL)close   close(NULL)close    close(NULL)close close close(NULL)":[153]" close(NULL)     (NULL)close     (NULL)close   close(NULL)close    close(NULL)close close close(NULL)":[153]"  (NULL)  *  (NULL)      (NULL)  *  (NULL)      (NULL)  *  (NULL)":[153]" close(NULL)close    (NULL)close     (NULL)close   close(NULL)closeclose    (NULL)close close close(NULL)
  21. 73 print" [160][221][160]    [221][160]     [221][160]   [160][221][160][160]    [221][160] [160] [160][221]":print" [160][202][195][195][195][192][192][203][160]     [202][192][195][195][192][192][203][160]    [160][202][192][195][192][195][192][203]":printl$:print"yours.":print"  [213][192][195][195][195][192][201][160][160]    [213][192][195][195][195][192][201]      [213][192][195][195][192][192][201]":print" [160][221]     [221][160]     [221][160]   [160][221][160]    [160][221][160] [160] [160][221]":print" [160][221]     [221][160]     [221][160]   [160][221][160]    [160][221][160] [160] [160][221]
  22. 89 [153]"  (NULL)  *  (NULL)      (NULL)  *  (NULL)      (NULL)  *  (NULL)":[153]" close(NULL)close    (NULL)close     (NULL)close   close(NULL)closeclose    (NULL)close close close(NULL)":[153]" close(NULL)close    (NULL)close     (NULL)close   close(NULL)closeclose    (NULL)close close close(NULL)":[153]" closemid$lenlenlentantan(NULL)close     mid$tanlenlentantan(NULL)close    closemid$tanlentanlentan(NULL)":[141]4100:[141]4000:[153]"press d to deal
  23. 104 geta$:ifa$<>"d"then104
  24. 110 ifs<10thengosub4020:printm$"you can't afford it!":gosub4100:s=0:gosub4010:goto1141
  25. 150 fora=5to10
  26. 153 c(a)=int(rnd(1)*13)+2:s(a)=int(rnd(1)*4)+1:ifc(a)=c(a-1)ands(a)=s(a-1)then153
  27. 162 ifc(a)=c(a-2)ands(a)=s(a-2)then153
  28. 165 ifc(a)=c(a-3)ands(a)=s(a-3)then153
  29. 168 ifc(a)=c(a-4)ands(a)=s(a-4)then153
  30. 171 ifc(a)=c(a-5)ands(a)=s(a-5)then153
  31. 200 next:s=s-10:p=20:b=15:fora=8to10:gosub3500:next:gosub4100:gosub3600:goto408
  32. 300 i=0:v$="":poke198,0:printm$:gosub4000:input"your bet";v$:ifv$=""thengosub4020:printm$"please enter a bet":gosub4010:goto300
  33. 302 ifval(v$)>9999thengosub4020:printm$"too much-try again":gosub4010:goto300
  34. 303 v=val(v$):ifv<1orv>9999thenm$"please type a number":gosub40
  35. 306 ifv>sthengosub4020:printm$"not enough stake-i win":i=1:p=0:gosub4100:gosub4010:goto500
  36. 307 ifval(v$)<vthengosub4020:printm$"not enough-bet again":gosub4010:goto300
  37. 320 ifval(v$)>sthengosub4020:printm$"you haven't got it!":gosub4010:goto300
  38. 335 v=val(v$):s=s-v:p=p+v:gosub4100:goto400
  39. 340 w=int(rnd(1)*7)+1:printm$:gosub4020:p=0:v=10:i=1:gosub4100:onwgoto350,351,352,353,354,355,356
  40. 350 print"chicken-i win":gosub4010:goto500
  41. 351 print"coward-you lose":gosub4010:goto500
  42. 352 print"yellowbelly-i win":gosub4010:goto500
  43. 353 print"sap-you lose the pot":gosub4010:goto500
  44. 354 print"wimp-i take the pot":gosub4010:goto500
  45. 355 print"dummy-my pot":gosub4010:goto500
  46. 356 print"wally-you lose":gosub4010:goto500
  47. 400 f=e(5)*int(rnd(1)*6+1):g=int(rnd(1)*75+25):iff<gthenh=int(rnd(1)*3+1):onhgoto403,403,404
  48. 402 q=rnd(1)*1.75+1.25:v1=v:q=int(v1*q+.5):goto406
  49. 403 ifv<int(rnd(1)*50+25)thengosub4000:printm$"i'll see you":p=p+v:gosub4100:gosub4010:goto500
  50. 404 gosub4000:printm$"i fold-your pot":s=s+p:p=0:i=1:gosub4100:gosub4010:goto500
  51. 406 iff>rnd(1)*125+75thengosub4000:printm$"i raise to"q:p=p+q:v=q:gosub4100:gosub4010:goto408
  52. 407 gosub4000:printm$"i bet"v"too":p=p+v:gosub4100:gosub4010
  53. 408 gosub4000:printm$"b-bet   s-see   f-fold
  54. 409 [161]a$:[139]a$[179][177]"b"[175]a$[179][177]"s"[175]a$[179][177]"f"[167]409
  55. 410 [139]a$[178]"b"[167]300
  56. 415 [139]a$[178]"f"[167]340
  57. 420 [139]s[177][178]v[167]i[178]0:p[178]p[170]v:s[178]s[171]v:[141]4100:[137]500
  58. 430 [141]4020:[153]m$"you can't pay-i win":p[178]0:[141]4100:[141]4010:i[178]1
  59. 500 b[178]0:[129]a[178]5[164]7:[141]3500:[130]:[139]i[178]1[167]1141
  60. 999 [153]m$:[139]e(5)[178]e(8)[167][141]4020:[153]"draw-my pot":p[178]0
  61. 1120 [139]e(5)[177]e(8)[167][141]4020:[153]"i win-my pot":p[178]0
  62. 1130 [139]e(5)[179]e(8)[167][141]4030:[153]"i lose-your pot":s[178]s[170]p:p[178]0
  63. 1135 [141]4100:[141]4010
  64. 1141 [139]s[177]0[175]s[179]10000[167]1150
  65. 1142 [139]s[179]1[167][141]4020:[153]m$"game over-you lost
  66. 1143 ifs>9999thengosub4030:printm$"game over-you won
  67. 1145 [141]4010:[141]4000:v[178]0:[141]4100:[153]m$"another game(y/n)?
  68. 1147 geta$:ifa$<>"y"anda$<>"n"then1147
  69. 1148 ifa$="y"then49
  70. 1149 ifa$="n"thengosub4000:printm$"thanks for playing-bye":gosub4010:goto4040
  71. 1150 gosub4000:printm$"your stake=\"s:gosub4010:v=10:gosub4100:gosub4000:printm$"hit p to play-e to end
  72. 2010 [161]a$:[139]a$[179][177]"p"[175]a$[179][177]"e"[167]2010
  73. 2020 [139]a$[178]"p"[167]50
  74. 2030 [139]a$[178]"e"[167][153]m$
  75. 2040 [139]s[178]1000[167][141]4000:[153]"you come out even-bye!
  76. 2050 ifs>1000thengosub4030:print"you won \"s-1000"- bye!
  77. 2060 [139]s[179]1000[167][141]4020:[153]"you lost \"1000[171]s"- bye!
  78. 2070 gosub4010:goto4040
  79. 3500 ifc(a)=14thenpokep(b),1:pokep(b+4),1
  80. 3515 ifc(a)=2thenpokep(b),50:pokep(b+4),50
  81. 3520 ifc(a)=3thenpokep(b),51:pokep(b+4),51
  82. 3525 ifc(a)=4thenpokep(b),52:pokep(b+4),52
  83. 3530 ifc(a)=5thenpokep(b),53:pokep(b+4),53
  84. 3535 ifc(a)=6thenpokep(b),54:pokep(b+4),54
  85. 3540 ifc(a)=7thenpokep(b),55:pokep(b+4),55
  86. 3545 ifc(a)=8thenpokep(b),56:pokep(b+4),56
  87. 3550 ifc(a)=9thenpokep(b),57:pokep(b+4),57
  88. 3555 ifc(a)=10thenpokep(b),49:pokep(b+1),48:pokep(b+3),49:pokep(b+4),48
  89. 3560 ifc(a)=11thenpokep(b),10:pokep(b+4),10
  90. 3565 ifc(a)=12thenpokep(b),17:pokep(b+4),17
  91. 3570 ifc(a)=13thenpokep(b),11:pokep(b+4),11
  92. 3580 ifs(a)=1thenpokep(b+2),83:pokeq(b),2:pokeq(b+1),2:pokeq(b+2),2:pokeq(b+3),2:pokeq(b+4),2
  93. 3585 ifs(a)=2thenpokep(b+2),88:pokeq(b),0:pokeq(b+1),0:pokeq(b+2),0:pokeq(b+3),0:pokeq(b+4),0
  94. 3590 ifs(a)=3thenpokep(b+2),90:pokeq(b),2:pokeq(b+1),2:pokeq(b+2),2:pokeq(b+3),2:pokeq(b+4),2
  95. 3595 ifs(a)=4thenpokep(b+2),65:pokeq(b),0:pokeq(b+1),0:pokeq(b+2),0:pokeq(b+3),0:pokeq(b+4),0
  96. 3597 b=b+5:return
  97. 3600 a=5:forh=1to2:forr=1to2:ifc(a)<c(a+1)theni=c(a):c(a)=c(a+1):c(a+1)=i:i=s(a):s(a)=s(a+1):s(a+1)=i
  98. 3630 ifc(a+1)<c(a+2)theni=c(a+1):c(a+1)=c(a+2):c(a+2)=i:i=s(a+1):s(a+1)=s(a+2):s(a+2)=i
  99. 3650 next:ifc(a)=3andc(a+1)=3andc(a+2)=3thene(a)=300:goto3900
  100. 3655 ifc(a)=c(a+1)andc(a)=c(a+2)thene(a)=c(a)+250:goto3900
  101. 3660 ifc(a)=14andc(a+1)=3andc(a+2)=2ands(a)=s(a+1)ands(a)=s(a+2)thene(a)=250:goto3900
  102. 3670 ifc(a)=c(a+1)+1andc(a)=c(a+2)+2ands(a)=s(a+1)ands(a)=s(a+2)thene(a)=c(a)+200:goto3900
  103. 3680 ifc(a)=14andc(a+1)=3andc(a+2)=2thene(a)=200:goto3900
  104. 3690 ifc(a)=c(a+1)+1andc(a)=c(a+2)+2thene(a)=c(a)+150:goto3900
  105. 3700 ifs(a)=s(a+1)ands(a)=s(a+2)thene(a)=c(a)+100:goto3900
  106. 3710 ifc(a)=c(a+1)thene(a)=c(a)+50:goto3900
  107. 3720 ifc(a+1)=c(a+2)thene(a)=c(a+1)+50:goto3900
  108. 3740 e(a)=c(a)
  109. 3900 a=8:next:ife(5)=e(8)thene(5)=e(5)+c(6):e(8)=e(8)+c(9)
  110. 3920 ife(5)=e(8)thene(5)=e(5)+c(7):e(8)=e(8)+c(10)
  111. 3930 return
  112. 4000 pokez-1,200:fort=1to50:next:pokez-1,0:return
  113. 4010 fort=1to2000:next:return
  114. 4020 return
  115. 4030 pokez,255:fort=1to200:next:pokez,0:return
  116. 4100 print"                                       ":print""p$"[159]"p;:printb$"[159]"v;:prints$"[159]"s:return
  117.