|\/|        (
|  |ANTICORE )OFTWARE FOR TI-82 and TI-83
Doug Torrance
torrance@geocities.com
http://www.geocities.com/Paris/3624
===================================

BLKJACK.82G

This file contains both prgmBLKJACK and prgmSHOWCARD, which is also a subroutine for prgmPOKER.

I hope you know how play blackjack!  The only thing that may be confusing in this game is the betting procedure.  I hate using the home screen for some reason, so I detest using input.  I had to come up with some crazy idea for how the player inputs their bet.

With the right and left arrows, you tell the calculator which decimal place (tens, hundreds, etc.) you want to change.  Then, with the up and down arrows, you tell the calculator how much you want to change your bet by.

For instance, if you want to bet $100, you press the left arrow twice to bring the decimal place that you want to edit to the hundreds.  (This is shown on the bottom of the screen.)You would then press the up arrow once to bring you bet to $100.  Press [2nd] to place your bet.

The bank is used in the same manner.

Here is the ascii code for those of you without a Graph-Link:

\START82\
\COMMENT=N
 file dated 12/29/96, 16:55
\NAME=BLKJACK
\FILE=A:\MYGAMES\BLKJACK.82P
:StoreGDB GDB1
:AxesOff
:ClrDraw
:FnOff 
:500\->\M
:0\->\O
:0\->\P
:0\->\Q
:0\->\R
:Lbl 0
:If M=0
:Then
:ClrDraw
:Text(31,30,"GAME OVER
:Pause 
:Disp 
:Goto Q
:End
:Menu("   BLACKJACK    ","PLAY",A,"VISIT THE BANK",1,"STATS",6,"HELP",2\#\
,"EXIT",Q
:Lbl 1
:ClrDraw
:Text(0,0,"WELCOME TO THE BANK!"
:Text(8,0,"YOU HAVE-",M
:Text(16,0,"YOU OWE-",Z
:10\->\A
:0\->\B
:Repeat K=21
:getKey\->\K
:Text(24,0,"TAKE OUT A LOAN FOR-",B,"        ")
:Text(32,0,"LOAN WILL INCREASE BY-",A,"        ")
:If (K=26)(A\<>\.01
:.1A\->\A
:If K=24
:10A\->\A
:B+A(K=25)\->\B
:B-A(K=34)(B-A\>=\0)\->\B
:End
:B+M\->\M
:B+Z\->\Z
:Goto 0
:Lbl 2
:Menu(" BLACKJACK HELP ","BETTING",3,"BANK",4,"ABOUT",5,"BACK",0,"EXIT"\#\
,Q
:Lbl 3
:ClrDraw
:Text(0,0,"YOU CANNOT BET MORE THAN
:Text(6,0,"YOU HAVE.  INCREASE YOUR BET
:Text(12,0,"BY PRESSING THE UP ARROW, 
:Text(18,0,"DECREASE IT WITH DOWN
:Text(24,0,"ARROW.  INCREASE/DECREASE
:Text(30,0,"THE AMOUNT THAT YOUR BET
:Text(36,0,"INCREASES WITH THE L AND R
:Text(42,0,"ARROWS.  PRESS [2nd] TO 
:Text(48,0,"PLACE BET AND PLAY GAME."
:Pause 
:Goto 2
:Lbl 4
:ClrDraw
:Text(0,0,"OUT OF MONEY?  GO TO THE
:Text(6,0,"BANK.  TAKE OUT A LOAN IN
:Text(12,0,"THE SAME MANNER AS
:Text(18,0,"BETTING, AND PRESS [2nd]
:Text(24,0,"WHEN DONE."
:Pause 
:Goto 2
:Lbl 5
:ClrDraw
:Text(0,0,"BLACKJACK               VERSION 4.6
:Text(8,13,"MANTIORE SOFTWARE
:Text(16,14,"FOR TI-82 and TI-83
:Text(24,15,"BY DOUG TORRANCE"
:Pause 
:ClrDraw
:Text(0,0,"VISIT MY WEB SITE AT:
:Text(8,0,"HTTP://WWW.GEOCITIES.COM
:Text(14,0,"/PARIS/3624
:Text(22,0,"E-MAIL:
:Text(30,0,"TORRANCE(a)GEOCITIES.COM
:Pause 
:Goto 2
:Lbl 6
:ClrDraw
:Text(0,0,"HANDS-",R
:Text(8,0,"WINS-",P
:Text(16,0,"LOSSES-",Q
:If R
:Text(24,0,"PERCENTAGE-",round(P/R,3)
:Pause 
:Goto 0
:Lbl Q
:[[0]]\->\[A]
:[A]\->\[B]
:[B]\->\[C]
:ClrDraw
:RecallGDB GDB1
:Stop
:Lbl A
:ClrDraw
:DispGraph
:{13,4}\->\dim [A]
:For(A,1,13
:For(B,1,4
:B\->\[A](A,B)
:End
:End
:Text(0,0,"MONEY-",M
:0\->\K
:1\->\A
:Text(29,0,"PRESS [CLEAR] TO GO TO BANK"
:Text(39,0,"PRESS [VARS] FOR HELP
:Text(55,0,"PRESS [2nd] TO PLACE BET.
:If O>M
:0\->\O
:Repeat (K=21)(O>0
:getKey\->\K
:If K=44
:Goto 3
:If K=45
:Goto 1
:Text(12,0,"BET-",O,"             "
:Text(47,0,"BET WILL INCREASE BY ",A,".    "
:O+A(K=25)(O+A\<=\M)\->\O
:O-A(K=34)(O-A\>=\0)\->\O
:If (K=24)(O+10A\<=\M)
:10A\->\A
:If (K=26)(A\<>\.01)
:.1A\->\A
:End
:{2,7}\->\dim [B]
:Fill(0,[B])
:[B]\->\[C]
:ClrDraw
:0\->\Xmin
:0\->\Ymin
:1\->\\Delta-x\
:1\->\\Delta-y\
:1+R\->\R
:Text(0,10,"DEALER"
:Text(28,10,"YOU"
:For(C,1,2)
:12C\->\D
:40\->\E
:14\->\A
:5\->\B
:prgmSHOWCARD
:Lbl D
:iPart 13rand+1\->\A
:iPart 4rand+1\->\B
:If [A](A,B)=0
:Goto D
:If C=2
:prgmSHOWCARD
:If C=1
:A\->\Y
:0\->\[A](A,B)
:If A>10
:10\->\A
:If (C=1)(A=1
:11\->\A
:If (C=2)(A=1)([C](1,1)\<>\1)
:11\->\A
:A\->\[C](1,C)
:B\->\[C](2,C)
:End
:0\->\K
:1\->\W
:For(C,1,7)
:12C\->\D
:40\->\E
:0\->\F
:For(G,1,7)
:F+[C](1,G)\->\F
:End
:If (F\<=\16)(C>2
:Then
:Lbl E
:iPart 13rand+1\->\A
:iPart 4rand+1\->\B
:If [A](A,B)=0
:Goto E
:prgmSHOWCARD
:0\->\[A](A,B)
:If A>10
:10\->\A
:If (A=1)(F+11\<=\21
:11\->\A
:A\->\[C](1,C)
:B\->\[C](2,C)
:End
:If W=1
:Then
:12\->\E
:Lbl B
:iPart 13rand+1\->\A
:iPart 4rand+1\->\B
:If [A](A,B)=0
:Goto B
:prgmSHOWCARD
:0\->\[A](A,B)
:If A>10
:10\->\A
:A\->\[B](1,C)
:B\->\[B](2,C)
:If (C\>=\2)(C\<>\7
:Then
:Text(55,0,"[Y=]:  HIT           [GRAPH]:  STAND"
:0
:Repeat (Ans=11)+(Ans=15)
:getKey
:If (Ans=15)(F\>=\17
:Goto C
:End
:End
:If Ans=15
:0\->\W
:End
:If C=6
:Text(55,0,"                                                           \#\
                               "
:End
:Lbl C
:Text(55,0,"                                                           \#\
                                               "
:12\->\D
:40\->\E
:Y\->\A
:[C](2,1)\->\B
:prgmSHOWCARD
:For(C,1,7)
:If [B](1,C)=1
:Then
:Text(55,0,"CARD NO. ",C," IS AN ACE"
:For(D,1,500)
:End
:Text(55,0,"[Y=]:  ONE    [GRAPH]:  ELEVEN"
:0
:Repeat (Ans=11)+(Ans=15
:getKey
:End
:If Ans=15
:11\->\[B](1,C)
:Text(55,0,"                                                           \#\
                                   "
:End
:End
:0\->\F
:0\->\G
:For(H,1,7)
:[B](1,H)+F\->\F
:[C](1,H)+G\->\G
:End
:Text(0,50,G)
:Text(28,50,F)
:If ((G>21)(F<21))+((F<21)(F>G
:Then
:Text(55,0,"YOU WON!"
:O+M\->\M
:1+P\->\P
:End
:If (F=21)(G\<>\21
:Then
:Text(55,0,"21!"
:2O+M\->\M
:1+P\->\P
:End
:If (F=G)(G\<=\21
:Text(55,0,"STANDOFF."
:If F>21
:Then
:Text(55,0,"YOU BUSTED."
:M-O\->\M
:1+Q\->\Q
:End
:If (F<G)(G\<=\21
:Then
:Text(55,0,"LOSER!"
:M-O\->\M
:1+Q\->\Q
:End
:For(A,1,500)
:End
:Text(55,0,"YOU NOW HAVE ",M
:Pause 
:Goto 0
\STOP82\



