Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!bcm!dimacs.rutgers.edu!seismo!ukma!rex!samsung!munnari.oz.au!brolga!uqcspe!batserver.cs.uq.oz.au!grue From: grue@batserver.cs.uq.oz.au (Frobozz) Newsgroups: comp.sys.handhelds Subject: Blackjack Keywords: blackjack fx602p Message-ID: <7573@uqcspe.cs.uq.oz.au> Date: 1 Mar 91 03:08:25 GMT Sender: news@uqcspe.cs.uq.oz.au Reply-To: grue@batserver.cs.uq.oz.au Organization: Computer Science Department, The University of Queensland, Brisbane, Australia Lines: 105 hiya, Here is a another program, it is blackjack for the Casio FX602P. To play press P0 and follow instructions. The program knows about most of blackjack, it doesn't know about splitting pairs or doubling down but it does know about 5 card tricks for the human player (yes, it provides an opponent). The program as listed provides an 8 pack deck of cards and it will actually draw from the deck properly (so you can count cards if you so desire). Aces are treated as 11 unless you bust when they get treated as 1 (this is quite normal). The maximum bet is $500 and fractional bets are ignored. Buying cards is $2 per card (after the first). P0: GSBP4 MAC Goto2 Lbl0 AC Min1F Min15 Min16 GSBP5 MR1F x=0 Goto1 X>=0 Goto7 MR18 M+19 Goto2 Lbl7 "You bust" MR18 M-19 Lbl2 501 MinF GSBP6 AC "Wager>" HLT ABS INT x=0 Goto2 x>=F Goto3 Min18 Goto0 Lbl3 "Limit=500" Goto2 Lbl1 MR15 Min14 AC Min15 Min16 Min1F GSBP7 MR1F x=0 Goto4 "I bust" MR18 M+19 Goto2 Lbl4 MR14 MinF MR15 x=F Goto5 x>=F Goto6 "You win" MR18 M+19 Goto2 Lbl6 "I win" MR18 M-19 Goto2 Lbl5 "We push" Goto2 [ 131 steps ] P4: "BLACKJACK!" [ 12 steps] P5: 1 Min17 GSBP9 Lbl0 "Total:ar15" PAUSE AC "Hit0/Stay1" HLT x=0 Goto1 Goto9 Lbl1 1 M+17 2 M+18 GSBP9 21 MinF MR15 x=F Goto2 x>=F Goto3 Lbl8 5 MinF MR17 x=F Goto6 Goto0 Lbl3 GSBP8 22 MinF MR15 x>=F Goto4 Goto8 Lbl4 1 Min1F Goto9 Lbl6 "Five under" Goto7 Lbl2 2 MinF MR17 x=F Goto5 Goto8 Lbl5 GSBP4 Lbl7 MR18 / 2 = INT M+18 1 +/- Min1F Lbl9 [ 99 steps ] P6: "You are:" PAUSE MR19 x=0 Goto1 x>=0 Goto2 "behind" Goto3 Lbl1 "even" Goto4 Lbl2 "ahead" Lbl3 PAUSE "ar19" Lbl4 PAUSE [ 48 steps ] P7: Min17 Lbl0 1 M+17 "Card:ar17" GSBP9 Lbl4 21 MinF MR15 "Total:ar15" x=F Goto2 x>=F Goto1 MR15 MinF 16 x>=F Goto0 Goto9 Lbl2 2 MinF MR17 x=F Goto5 Goto9 Lbl5 GSBP4 1 Min14 Goto9 Lbl1 GSBP8 22 MinF MR15 x>=F Goto3 Goto4 Lbl3 1 Min1F Lbl9 [ 63 steps ] P8: Lbl8 MR16 x=0 Goto9 10 M-15 1 M-16 22 MinF MR15 x>=F Goto8 Lbl9 [ 16 steps ] P9: 13 Min00 MinF AC Lbl0 + IND MR00 DSZ Goto0 = x>=F x=F Goto1 Lbl9 "Draw " RAN# * 13 + 1 = INT Min00 MinF IND MR00 x=0 Goto9 1 IND M-00 9 x>=F Goto4 5 M-00 IND Goto0 Lbl5 ";Jack" 9 Goto3 Lbl6 ";Queen" 9 Goto3 Lbl7 ";King" 9 Goto3 Lbl8 ";Ace" 1 M+16 10 Goto3 Lbl4 1 + MR00 = ";#" MR00 Goto3 Lbl1 "Shuffling" 13 Min00 32 Lbl2 IND Min00 DSZ Goto2 Goto9 Lbl3 Min00 ISZ MR00 M+15 [ 129 steps ] For those who want to, change all PAUSEs in the program to GSBP3s and enter the following for P3... P3: 15 Min00 Lbl0 DSZ Goto0 This stops cheating from being possible during the pauses and speeds up the play a little. Pauli seeya Paul Dale | Internet/CSnet: grue@batserver.cs.uq.oz.au Dept of Computer Science| Bitnet: grue%batserver.cs.uq.oz.au@uunet.uu.net Uni of Qld | JANET: grue%batserver.cs.uq.oz.au@uk.ac.ukc Australia, 4072 | EAN: grue@batserver.cs.uq.oz | UUCP: uunet!munnari!batserver.cs.uq.oz!grue f4e6g4Qh4++ | JUNET: grue@batserver.cs.uq.oz.au --