Blackjack, by Doug Zuckerman. 1996. Email: dszucker@students.wisc.edu RLG28@aol.com This is the most comprehensive blackjack program available for the TI-82. It implements a new 52 card deck for each new hand. Limitations: No known limitations ----begin documentation---- Blackjack, by Doug Zuckerman. 1996. Email: dszucker@students.wisc.edu RLG28@aol.com This is the most comprehensive blackjack program available for the TI-82. It implements a new 52 card deck for each new hand. Limitations: No known limitations ----begin ascii---- \START82\ \COMMENT=Program file dated 10/08/96, 22:46 \NAME=BLACKJAC \FILE=C:\WINLINK\BLACKJAC.82P :Func:FullScreen :FnOff :PlotsOff :AxesOff :0\->\Xmin:94\->\Xmax :0\->\Ymin:62\->\Ymax :ClrDraw :For(X,1,50) :Text(15,80-X,"BLACK") :Text(15,X," ") :Text(15,X+1,"JACK") :End :Text(22,45,"BY") :Text(29,21,"DOUG ZUCKERMAN") :Text(36,41,"1996") :Pause :Lbl T :ClrHome :Menu(" BLACKJACK(21) ","CONTINUE LAST",8,"NEW GAME",\@\,"INSTRUCTIONS"\#\ ,0,"QUIT",C,"RED DOG",J,"POKER",E) :Lbl 0 :Disp "WELCOME TO THE","NEWEST AND MOST","INNOVATIVE","TI-82 BLACKJACK.\#\ " :Pause :ClrHome :Disp "CREATED BY","DOUG ZUCKERMAN","1996." :Pause :ClrHome :Disp "BLACKJACK PAYS","3 TO 2." :Disp "5 CARD CHARLIE","PAYS 5 TO 2" :Pause :ClrHome :Disp "PRESS 1 TO HIT,","2 TO STAND, OR","3 TO DOUBLE DOWN" :Pause :ClrHome :Disp "IF YOU","DOUBLE DOWN","YOU GET ONLY ONE","HIT TO BEAT THE","DEAL\#\ ER, BUT..." :Pause :ClrHome :Disp "IF YOU WIN,","YOU RECEIVE","DOUBLE.","IF YOU LOSE,","YOU LOSE TH\#\ E","ORIGINAL WAGER." :Pause :Goto T :Lbl \@\ :1000\->\I :Lbl 8 :ClrHome :If I=0:Then :Output(4,4,"OUTTA CASH!"):Pause :Goto T:End :Disp "YOU HAVE" :Disp I :Disp "DOLLARS." :Disp "HOW MUCH WOULD" :Disp "YOU LIKE" :Input "TO BET?",D :If D>I or D\<=\0 :Goto 8 :ClrDraw:ClrHome :For(X,1,13) :X\->\\L1\(X) :End :For(X,1,13) :X\->\\L1\(X+13) :End :For(X,1,13) :X\->\\L1\(X+26) :End :For(X,1,13) :X\->\\L1\(X+39) :End :0\->\\L5\(1) :0\->\\L3\(1) :0\->\\L2\(1) :0\->\\L2\(2) :0\->\\L4\(1) :0\->\\L6\(1) :0\->\E :0\->\O :0\->\Y :2\->\R:15\->\W :Horizontal 41 :Horizontal 33 :Line(40,41,40,33) :Line(77,41,77,49) :Line(77,49,94,49) :Horizontal 1 :Horizontal 9 :Line(48,1,48,9) :Line(77,51,77,61) :Line(78,51,78,61) :Line(83,60,83,52) :Line(84,53,84,59) :Line(86,61,94,61) :Line(86,51,93,51) :Line(85,51,94,61) :Line(86,51,93,61) :Line(79,51,82,51) :Line(79,61,82,61) :Line(87,52,94,52) :Line(85,60,93,60) :For(L,1,4) :Lbl 1 :int (rand*52)+1\->\Z :If \L1\(Z)=0 :Goto 1 :If \L5\(1)=2:Goto 5 :\L5\(1)+1\->\\L5\(1) :\L6\(1)+1\->\\L6\(1) :If \L1\(Z)=1 :Text(2,Y+4,"A ") :If \L1\(Z)=11 :Text(2,Y+4,"J ") :If \L1\(Z)=12 :Text(2,Y+4,"Q ") :If \L1\(Z)=13 :Text(2,Y+4,"K ") :If (\L1\(Z)>1)(\L1\(Z)<11) :Text(2,Y+4,\L1\(Z)) :If (Z>0)(Z<14) :Then :Line(Y+9,47,Y+9,48) :Line(Y+10,46,Y+10,49) :Line(Y+11,45,Y+11,48) :Line(Y+12,46,Y+12,49) :Line(Y+13,47,Y+13,48):End :If (Z>13)(Z<27) :Then :Line(Y+9,47,Y+13,47) :Line(Y+11,45,Y+11,49) :Line(Y+10,46,Y+10,48) :Line(Y+12,46,Y+12,48):End :If (Z>26)(Z<40) :Then :Line(Y+11,45,Y+11,49) :Line(Y+10,48,Y+12,48) :Line(Y+9,47,Y+13,47) :Line(Y+9,46,Y+13,46):End :If (Z>39)(Z<53) :Then :Line(Y+9,46,Y+9,47) :Line(Y+10,46,Y+10,49) :Line(Y+11,45,Y+11,49) :Line(Y+12,46,Y+12,49) :Line(Y+13,46,Y+13,47):End :Line(R,43,R,61) :Line(W,43,W,61) :Line(R,43,W,43) :Line(R,43,W,61) :Line(R,61,W,61) :15+R\->\R:15+W\->\W :If \L1\(Z)=11:O-1\->\O :If \L1\(Z)=12:O-2\->\O :If \L1\(Z)=13:O-3\->\O :\L1\(Z)+O\->\O :If \L1\(Z)=1 and O<12:Then:O+10\->\O:1\->\\L2\(1):End :If O>21 and \L2\(1)=1:Then:O-10\->\O :0\->\\L2\(1) :End :Text(22,1,"YOU HAVE:",O) :Text(22,45,"1:HIT 2:STAND") :Text(14,80,"3:D D") :If (O=21)(\L6\(1)=2):Then :Text(54,5,"BLACKJACK!"):Goto 4 :End :If O>21:Then :Text(54,60,"BUSTED!"):Pause :I-D\->\I:Goto 8:End :If \L6\(1)=5 and O\<=\21:Then :Line(33,25,85,25) :Line(33,17,85,17) :Line(33,17,33,25) :Line(85,17,85,25) :Text(38,35,"5 CARD CHARLIE!"):I+D\->\I:Goto 4:End :Y+15\->\Y :0\->\\L1\(Z) :End :If \L4\(1)=1:Goto 6 :Lbl H :getKey\->\G :If G=92:Then :Goto 1:End :If G=93:Then:Goto 6:End :If G=94 and \L6\(1)=2:Then:1\->\\L4\(1):D\->\E :Goto 1:End :Goto H :Lbl 5 :0\->\T :0\->\\@\ :2\->\M:15\->\V :Lbl 6 :int (rand*52)+1\->\Z :If \L1\(Z)=0:Then :Goto 6:Else:\L3\(1)+1\->\\L3\(1):End :If \L1\(Z)=1 :Text(34,\@\+4,"A ") :If \L1\(Z)=11 :Text(34,\@\+4,"J ") :If \L1\(Z)=12 :Text(34,\@\+4,"Q ") :If \L1\(Z)=13 :Text(34,\@\+4,"K ") :If (\L1\(Z)>1)(\L1\(Z)<11) :Text(34,\@\+4,\L1\(Z)) :If (Z>0)(Z<14) :Then :Line(\@\+9,15,\@\+9,16) :Line(\@\+10,14,\@\+10,17) :Line(\@\+11,13,\@\+11,16) :Line(\@\+12,14,\@\+12,17) :Line(\@\+13,15,\@\+13,16):End :If (Z>13)(Z<27) :Then :Line(\@\+9,15,\@\+13,15) :Line(\@\+11,13,\@\+11,17) :Line(\@\+10,14,\@\+10,16) :Line(\@\+12,14,\@\+12,16):End :If (Z>26)(Z<40) :Then :Line(\@\+11,13,\@\+11,17) :Line(\@\+10,16,\@\+12,16) :Line(\@\+9,15,\@\+13,15) :Line(\@\+9,14,\@\+13,14):End :If (Z>39)(Z<53) :Then :Line(\@\+9,14,\@\+9,15) :Line(\@\+10,14,\@\+10,17) :Line(\@\+11,13,\@\+11,17) :Line(\@\+12,14,\@\+12,17) :Line(\@\+13,14,\@\+13,15):End :Line(M,11,M,29) :Line(V,11,V,29) :Line(M,11,V,11) :Line(M,11,V,29) :Line(M,29,V,29) :Line(17,29,30,29) :Line(17,11,30,11) :Line(17,29,17,11) :Line(30,29,30,11) :Line(17,11,30,29) :15+M\->\M:15+V\->\V :If \L1\(Z)=11:T-1\->\T :If \L1\(Z)=12:T-2\->\T :If \L1\(Z)=13:T-3\->\T :\L1\(Z)+T\->\T :If \L1\(Z)=1 and T<12:Then:T+10\->\T:1\->\\L2\(2):End :If T>21 and \L2\(2)=1:Then:T-10\->\T :0\->\\L2\(2) :End :\@\+15\->\\@\ :0\->\\L1\(Z) :If \L3\(1)=1:Then:\L5\(1)+1\->\\L5\(1):Text(54,5," SHOWING:",T) :Goto H:End :If T<17 and \L3\(1)>1:Then :Goto 6:Else :Text(54,1,"DEALER HAS:",T):End :If 21\>=\T and T>O:Then :Text(54,52,"DEALER WINS"):Pause :I-D\->\I:Goto 8:End :If O=T:Then: :Text(54,60,"BUMP...>"):Pause :Goto 8:End :Lbl 7 :Text(54,58,"YOU WIN!") :Pause :I+D+E\->\I:Goto 8 :Lbl 4 :Text(54,58,"YOU WIN!"):Pause :I+1.5D\->\I:Goto 8 :Lbl C:AxesOn:ZDecimal:ClrList \L1\,\L2\,\L3\,\L4\,\L5\,\L6\:Stop :Lbl J :prgmREDDOG :Lbl E :prgmPOKER \STOP82\