A casino blackjack game for one to six players against a dealer drawn in UDGs at the head of a green table. Each player buys in with chips and places a bet before every hand, then may hit, stand, double down or split a pair, and insurance is offered when the dealer shows an ace. The dealer draws to 16 and stands on 17, a natural blackjack pays 3 to 2, and each player’s stake is kept at the left of the screen. The first two cards of each hand come from a six-deck shoe that is reshuffled after about 260 cards. Answering n to “New hand?” ends the game with a parting joke from the house.
The game is by Thomas H. Nooter. Its title screen reads “The Silicon Chip Casino” and reminds you that the game is set for lower case, but names no author; lines 8076–9040, which the program never reaches, hold a second title screen headed “CASINO BLACKJACK” with a 1983 copyright line for T.H. Nooter. A screen from this program appears in Donald Lambert’s column “From the Chairman’s Disk”, which says it reached him on a tape from Joan Kealy.
Program Analysis
Structure
- Lines 10–50: the title screen, with block-graphic lettering, the UDG dealer and the “Set for lower case” note.
- Lines 60–90: draw the table (line 8000) and read the screen positions of the six player places into
z(2,6)from DATA. - Lines 105–255: the number of players and each player’s chip buy-in.
- Lines 260–350: one hand. It reshuffles if needed, takes bets (line 9300), deals (line 9400), offers insurance (line 7000) and runs the players’ turns (line 1000).
- Lines 1000–1510: each player’s turn, with hits at line 2000, doubling at line 2500 and split hands at lines 2800–3830.
- Lines 1512–1599 and 9700–9977: the dealer turns over the hole card and draws until reaching 17 or more.
- Lines 6000–6660: settle each bet and show the new stake. Lines 7000–7210 handle insurance.
- Lines 9980–9988: the “New hand?” prompt, the reshuffle check and the exit message.
- Line 9996: the tape loader. It loads
BJ.CODto 65368 and jumps to line 10.
Cards and Scoring
Cards are random ranks from 1 to 13. During the deal, r() counts each rank and rejects a rank that has already appeared 24 times, which models a six-deck shoe, and deck counts the cards dealt. Each hand keeps two totals in s(n,1) and s(n,2), the hard total and the total with an ace counted as 11. Picture cards count 10. A split hand keeps its own pair of totals in q(hand,1..2,player).
Notable Techniques
BJ.CODholds all 21 UDGs (168 bytes). UDGs a–r build the dealer’s head, body and hands. UDG s is a narrow “10”, so every card value fits in one character cell, and UDG u is the patterned back of the dealer’s hole card.- Dealing is animated by swapping UDGs t and q at the dealer’s hand between each card.
- Card values alternate between red and black ink so neighbouring cards stand apart. There are no suits.
- After any amount that can include a half dollar (3 to 2 payouts, insurance), the program prints a trailing
0when the value is not whole, so 12.5 shows as 12.50. - The bust and settle routines repaint a player’s area in table green and redraw the betting circle with
CIRCLE, chosen byGO TO 6700+n.
Potential Issues
- Lines 1210–1250 read
INKEY$afresh for each test. If the key is released before line 1250, the program appears to fall through to line 1400 and announce BLACKJACK for that player. - Line 6060 jumps to line 6200, which does not exist, so it runs line 6210. A dealer total of 21 therefore beats a player’s 21 of three or more cards instead of pushing.
- Insurance pays back twice the insurance stake (line 7150). Since the stake was already taken, that is a net win of 1 to 1, not the usual 2 to 1.
- Cards drawn on hits (line 9700) are random and do not update
r()ordeck, so only the first two cards of each hand come from the six-deck shoe. - Bets and buy-ins are not checked against the stated $99 and $999 limits or against the stake, so doubling or splitting can take a stake below zero.
- The prompt in line 1190 offers “Split PAIR (P)”, but only a lower-case p is accepted.
- Lines 7300–7330, 7999 and 8076–9100 are never reached.
This program came from an Oliger (JLO SAFE) disk and was converted to load from tape. The disk-specific LOAD / and SAVE / commands in lines 9996 and 9999 became plain tape commands, and BJ autostarts at line 9996, which loads the UDG file BJ.COD and starts the game. It was tested in ZEsarUX through the title screen and the player-count prompt.
Source Code
10 REM "bj"
12 PAPER 6: INK 2: BORDER 6
13 CLS
14 PRINT AT 1,0;":::::: :: :: :: ::"
15 PRINT AT 2,0;":: :: :: :::::: :::::: :: :::::: :::::: ::"
16 PRINT AT 3,0;":::::: :: :: :: :: :: :: :: :: :: ::"
17 PRINT AT 4,0;":: :: :: :::::: :: :::: :: :::::: :: ::::"
18 PRINT AT 5,0;":::::: :: :::::: :::::: :: :: :: :::::: :::::: :: ::"
19 PRINT AT 6,19;"::": PRINT AT 7,18;"::::"
20 PAPER 6: INK 0: PRINT AT 8,7;"abc"
22 PRINT AT 9,7;"def"
24 PRINT AT 10,7;"ghi"
26 PRINT AT 11,6;"njklm"
28 PRINT AT 12,5;"n::::::::::m"
30 PRINT AT 13,5;"::::::::::::::"
32 PRINT AT 14,5;"o::q::r::p"
34 PRINT AT 15,3;"::::::::::::::::::::::::::::::::::::::::::::::::::"
36 PAPER 4: INK 6: FOR n=16 TO 21: PRINT AT n,3;" ": NEXT n
38 PRINT AT 17,4;"The Silicon Chip Casino"
40 INK 7: PRINT AT 19,6;"Set for lower case"
50 PAUSE 420
60 GO SUB 8000
70 DIM z(2,6)
71 LET doub=0
72 DATA 10,13,15,15,13,10,27,24,19,13,8,5
74 RESTORE
76 FOR n=1 TO 2: FOR m=1 TO 6
78 READ f
80 LET z(n,m)=f
82 NEXT m
84 NEXT n
90 RANDOMIZE
105 LET deck=0
110 PAPER 6: INK 1
115 GO SUB 9200
120 PRINT AT 2,17;"Welcome to the": PRINT AT 3,17;"Silicon Chip!"
130 PRINT AT 5,17;"How many": PRINT AT 6,17;"players?"
135 PRINT AT 7,17;"(Up to 6)"
140 INPUT pl
145 IF pl>6 OR pl<1 THEN GO TO 120
150 GO SUB 9200
160 DIM p(pl)
165 DIM i(pl)
170 FOR n=1 TO pl: PRINT AT 1,17;"Player ";n;", how"
180 PRINT AT 2,17;"much do you": PRINT AT 3,17;"want in chips?"
185 PRINT AT 4,17;"($999 or less)"
190 INPUT s
200 LET p(n)=s
210 PRINT AT 5,17;"CHECK CHANGE!"
220 PRINT AT 6,21;"$";s
230 PRINT AT 8,18;"GOOD LUCK!"
232 PRINT AT n,0;n;". $";p(n)
235 PAUSE 210
240 PRINT AT 5,17;" ": PRINT AT 6,20;" "
250 PRINT AT 8,18;" "
255 NEXT n
260 IF deck=0 THEN GO TO 280
270 GO SUB 9200
272 LET deck=0
275 PRINT AT 2,18;"Reshuffling."
277 PAUSE 60
280 DIM r(13)
300 DIM c(8,pl+1)
301 LET a=0
302 DIM s(pl+1,2)
303 DIM a(pl+1)
304 DIM q(2,2,pl)
305 GO SUB 9200
310 GO SUB 9300
320 GO SUB 9200
330 GO SUB 9400
340 IF c(2,pl+1)=1 THEN GO SUB 7000
350 GO SUB 1000
500 STOP
1000 PAUSE 5
1010 FOR n=1 TO pl
1012 LET h=0: LET pp=0
1015 LET ace=0
1017 LET a(n)=0
1025 IF c(1,n)>10 THEN LET c(1,n)=10
1030 IF c(2,n)>10 THEN LET c(2,n)=10
1040 IF c(1,n)=1 THEN LET ace=10
1045 IF c(2,n)=1 THEN LET ace=10
1050 LET s(n,1)=c(1,n)+c(2,n)
1060 LET s(n,2)=ace+s(n,1)
1065 IF s(n,2)=21 THEN GO TO 1400
1070 GO SUB 9200
1075 PRINT AT 0,18;"Player ";n;", you"
1080 PRINT AT 1,18;"have ";s(n,1);
1090 IF s(n,2)>s(n,1) THEN GO TO 1110
1100 PRINT "; "
1105 GO TO 1120
1110 IF s(n,2)>21 THEN GO TO 1118
1115 IF s(n,2)>s(n,1) THEN PRINT " or ";s(n,2);";"
1116 GO TO 1120
1118 PRINT "; "
1120 PRINT AT 2,18;"You may:"
1130 PRINT AT 3,18;"HIT (h), "
1135 IF (s(n,1)>11 OR a(n)>0) THEN PRINT AT 3,25;" or "
1140 PRINT AT 4,18;"STAND (s) "
1145 IF a(n)>0 THEN GO TO 1200
1150 IF c$(1,n)=c$(2,n) THEN GO TO 1175
1155 IF s(n,1)>11 THEN GO TO 1200
1160 PRINT AT 5,18;"or DOUBLE (d)."
1165 PRINT AT 6,18;" "
1170 GO TO 1200
1175 IF s(n,1)>11 THEN GO TO 1195
1180 PRINT AT 5,18;"DOUBLE (d), or"
1190 PRINT AT 6,18;"Split PAIR (P)"
1192 GO TO 1200
1195 PRINT AT 5,28;"or": PRINT AT 6,17;"Split PAIR (p)"
1200 PAUSE 0
1210 IF INKEY$="s" THEN GO TO 1500
1220 IF INKEY$="h" THEN GO TO 2000
1230 IF INKEY$="d" THEN GO TO 2500
1240 IF INKEY$="p" THEN GO TO 2800
1250 IF INKEY$<>"" THEN GO TO 1200
1400 PAPER 6: PRINT AT 0,18;"Player ";n;" has "
1410 PRINT AT 1,18;"BLACKJACK! "
1412 FOR y=2 TO 6
1414 PRINT AT y,18;" "
1416 NEXT y
1420 PAUSE 100
1430 GO TO 1510
1500 IF s(n,2)>=s(n,1) THEN LET s(n,1)=s(n,2)
1505 PAUSE 10
1510 NEXT n
1512 INK 0: PRINT AT 8,12;"::": PAPER 6: INK 4: PRINT AT 9,11;"t"
1514 PAUSE 10
1516 INK 2: PAPER 4: PRINT AT 9,11;"..": INK 0: PAPER 6: PRINT AT 8,12;"q"
1520 INK 2: PAPER 7: PRINT AT 12,14;c$(1,pl+1)
1530 LET a=1
1540 GO SUB 9200
1550 LET w=pl+1
1552 IF c(1,w)>10 THEN LET c(1,w)=10
1553 IF c(2,w)>10 THEN LET c(2,w)=10
1555 LET s(w,1)=c(1,w)+c(2,w)
1557 LET s(w,2)=s(w,1)
1560 IF c(1,w)=1 OR c(2,w)=1 THEN LET s(w,2)=s(w,1)+10
1565 IF s(w,2)=21 THEN GO TO 9975
1570 PRINT AT 1,18;"Dealer has ";s(w,2)
1572 PAUSE 60
1575 IF s(w,2)>16 THEN GO TO 6000
1580 GO SUB 9700
1590 GO SUB 7500
1599 GO TO 300
2000 LET h=h+1
2001 LET a(n)=a(n)+1
2005 GO SUB 9700
2010 GO SUB 9200
2015 IF s(n,2)>21 THEN LET s(n,2)=s(n,1)
2020 IF s(n,1)>21 THEN GO TO 2050
2030 IF s(n,1)<21 THEN GO TO 1070
2040 IF s(n,1)=21 THEN GO TO 2100
2050 PRINT AT 1,18;"Player ";n;", you"
2060 PRINT AT 2,18;"have ";s(n,1);", you"
2070 PRINT AT 3,22;"BUST!"
2071 PAPER 4: PAUSE 80
2072 PRINT AT z(1,n),z(2,n);" "
2074 FOR u=1 TO 6
2076 PRINT AT z(1,n)+6-u,z(2,n);" "
2078 NEXT u
2080 GO SUB 6700
2085 PAPER 6
2090 GO TO 1510
2100 PRINT AT 1,18;"Player ";n;", you"
2110 PRINT AT 2,18;"have 21,"
2120 PRINT AT 3,18;"Very good!"
2125 PAUSE 80
2130 GO TO 1510
2500 LET p(n)=p(n)-b(n): LET b(n)=2*b(n)
2503 LET doub=1: LET h=1
2505 PAPER 4: INK 1
2510 PAPER 6: INK 1: PRINT AT z(1,n),z(2,n);"D";: PAPER 4: INK 2: PRINT b(n)
2515 INK 1: PAPER 6: PRINT AT n,4;" ": PRINT AT n,4;p(n)
2520 GO SUB 9700
2525 PAPER 6
2530 GO SUB 9200
2540 PRINT AT 0,18;"Player ";n;", you": PRINT AT 1,18;"have ";s(n,2);"."
2542 LET doub=0
2545 PAUSE 60
2550 GO TO 1510
2800 PAPER 4: PRINT AT z(1,n)+4,z(2,n);" "
2802 INK 1: PRINT AT z(1,n)+1,z(2,n);"$";b(n)
2803 INK 1: PAPER 6: PRINT AT n,4;" ": LET p(n)=p(n)-b(n): PRINT AT n,4;p(n);
2804 IF p(n)<>INT (p(n)) THEN PRINT "0"
2805 LET qy=0: LET pp=1
2806 LET sp=0
2807 INK 0: PRINT AT 8,12;"::": PAPER 6: INK 4: PRINT AT 9,11;"t"
2808 PAUSE 10
2809 INK 2: PAPER 4: PRINT AT 9,11;"..": INK 0: PAPER 6: PRINT AT 8,12;"q"
2810 IF h/2=INT (h/2) THEN GO TO 2830
2820 PAPER 7: INK 0: GO TO 2840
2830 PAPER 7: INK 2
2840 PRINT AT z(1,n)+5,z(2,n)+INT (2.9-1/n);c$(2,n)
2900 LET sp=sp+1
2905 GO SUB 9700
2907 PAPER 7: INK 2
2910 IF pp=2 THEN GO TO 2950
2920 PRINT AT z(1,n)+5-sp,z(2,n)+INT (2.9-1/n);h$
2930 GO TO 2960
2950 PRINT AT z(1,n)+5-sp,z(2,n);h$
2960 IF crd>10 THEN LET crd=10
2965 IF sp>1 THEN GO TO 3000
2967 IF c(1,n)>10 THEN LET c(1,n)=10
2970 LET q(pp,1,n)=crd+c(1,n)
2975 LET q(pp,2,n)=q(pp,1,n)
2985 IF (crd=1 OR c(1,n)=1) THEN LET q(pp,2,n)=q(pp,1,n)+10
2990 IF pp=2 THEN GO TO 2997
2995 LET pp=2: GO TO 2905
2997 IF c(1,n)=1 THEN GO TO 3750
2998 LET pp=1: GO TO 3500
3000 LET q(pp,1,n)=q(pp,1,n)+crd
3005 LET q(pp,2,n)=q(pp,2,n)+crd
3010 IF crd=1 THEN LET q(pp,2,n)=q(pp,2,n)+10
3020 IF q(pp,2,n)>21 THEN LET q(pp,2,n)=q(pp,2,n)-10
3035 IF q(pp,2,n)>21 THEN LET q(pp,2,n)=q(pp,2,n)-10
3040 IF q(pp,1,n)>q(pp,2,n) THEN LET q(pp,2,n)=q(pp,1,n)
3060 IF q(pp,1,n)>21 THEN GO TO 3700
3070 GO TO 3500
3500 IF pp=1 THEN LET y$="right-hand hand"
3510 IF pp=2 THEN LET y$="left-hand hand"
3520 GO SUB 9200
3525 PAPER 6: INK 1
3530 PRINT AT 1,17;"Player ";n;", your"
3540 PRINT AT 2,17;y$
3550 PRINT AT 3,17;"has ";q(pp,1,n);
3555 IF q(pp,2,n)>q(pp,1,n) THEN PRINT AT 4,17;" or ";q(pp,2,n);","
3560 PRINT AT 5,17;"you may HIT (H)"
3570 PRINT AT 6,18;"or STAND (S)."
3580 PAUSE 0
3590 IF INKEY$<>"h" THEN GO TO 3800
3600 GO TO 2900
3700 GO SUB 9200
3710 PRINT AT 3,17;"You got ";q(pp,1,n);", you"
3720 PRINT AT 4,21;"BUST!"
3722 LET qy=qy+1
3725 GO SUB 4000
3730 PAUSE 70
3740 GO TO 3800
3750 GO SUB 9200
3760 LET pp=1: LET y$="right-hand"
3765 PRINT AT 1,17;"Player ";n;", your"
3770 PRINT AT 2,17;y$;" hand"
3775 PRINT AT 3,17;"has ";q(pp,1,n)+10;"."
3780 PAUSE 70
3782 IF pp=2 THEN GO TO 1510
3785 GO SUB 9200
3790 LET pp=2: LET y$="left-hand"
3795 GO TO 3765
3800 IF pp=2 THEN GO TO 3820
3810 LET sp=1: LET pp=2: GO TO 3500
3820 LET pp=0
3830 GO TO 1510
4000 PAPER 4
4001 IF qy=1 THEN GO TO 4007
4003 PRINT AT z(1,n),z(2,n);" "
4005 GO TO 4009
4007 PRINT AT z(1,n)+1,z(2,n);" "
4009 IF pp=1 THEN GO TO 4050
4010 FOR e=1 TO 5
4020 PRINT AT z(1,n)+6-e,z(2,n);" "
4030 NEXT e
4035 PAPER 6
4040 RETURN
4050 FOR e=1 TO 5
4060 PRINT AT z(1,n)+6-e,z(2,n)+INT (2.9-1/n);" "
4070 NEXT e
4075 PAPER 6
4080 RETURN
5000 LET y$="on the Right"
5005 LET pp=1
5010 LET s(n,1)=q(pp,1,n)
5020 LET s(n,2)=q(pp,2,n)
5030 RETURN
5040 LET y$="on the Left"
5050 LET s(n,1)=q(2,1,n)
5060 LET s(n,2)=q(2,2,n)
5070 LET pp=0
5080 GO TO 6020
6000 PAUSE 30: GO SUB 9200
6005 IF s(pl+1,2)=21 AND c(2,pl+1)=1 THEN GO SUB 7100
6010 FOR n=1 TO pl
6015 LET pp=0: LET y$=" "
6017 IF q(1,1,n)>0 THEN GO SUB 5000
6020 IF s(n,1)>21 THEN GO TO 6647
6030 IF s(n,2)<=s(n,1) THEN LET s(n,2)=s(n,1)
6035 IF s(n,2)=21 AND a(n)=0 THEN GO TO 6550
6040 IF s(n,2)>21 THEN LET s(n,2)=s(n,1)
6050 IF s(pl+1,2)>21 THEN GO TO 6100
6060 IF s(pl+1,2)=21 THEN GO TO 6200
6070 IF s(pl+1,2)=s(n,2) THEN GO TO 6300
6080 IF s(pl+1,2)<s(n,2) THEN GO TO 6400
6090 IF s(pl+1,2)>s(n,2) THEN GO TO 6500
6100 LET w$="wins!": LET p(n)=p(n)+b(n)*2
6105 LET bet=2*b(n)
6110 GO TO 6600
6210 LET w$="loses": LET bet=0
6220 GO TO 6600
6260 LET w$="pushes": LET p(n)=p(n)+b(n)
6265 LET bet=b(n)
6270 GO TO 6600
6300 IF ace=0 AND s(pl+1,2)=21 THEN GO TO 6350
6310 LET w$="pushes": LET bet=b(n)
6320 LET p(n)=p(n)+b(n)
6330 GO TO 6600
6350 LET w$="loses": LET bet=0
6360 GO TO 6600
6400 LET w$="wins!": LET p(n)=p(n)+2*b(n): LET bet=2*b(n)
6410 GO TO 6600
6500 LET w$="loses": LET bet=0
6510 GO TO 6600
6550 IF s(pl+1,2)=21 AND a=1 THEN GO TO 6575
6560 LET bet=2.5*b(n): LET w$="WINS!": LET p(n)=p(n)+bet
6570 GO TO 6600
6575 LET bet=b(n): LET w$="pushes"
6600 GO SUB 9200
6605 PRINT AT 0,18;"Player ";n
6610 PRINT AT 1,18;w$;
6612 IF y$(1 TO 1)=" " THEN PRINT ";"
6615 PRINT AT 2,18;y$
6620 PRINT AT 3,18;"Collect $";bet
6625 IF w$<>"loses" THEN PRINT AT 4,18;"Bet ";
6628 IF w$="wins!" OR w$="WINS!" THEN PRINT AT 4,22;"+ winnings"
6630 PRINT AT 6,18;"Stake is ": PRINT AT 7,18;"$";p(n);
6632 IF p(n)<>INT p(n) THEN PRINT "0"
6635 PRINT AT n,4;" ": PRINT AT n,4;p(n);
6637 IF p(n)<>INT p(n) THEN PRINT "0"
6640 PAUSE 120
6645 GO SUB 9200
6647 IF pp=1 THEN GO TO 5040
6650 NEXT n
6660 GO TO 9980
6700 INK 2: GO TO 6700+n
6701 CIRCLE 223,88,9: GO TO 6708
6702 CIRCLE 199,68,9: GO TO 6708
6703 CIRCLE 161,50,9: GO TO 6708
6704 CIRCLE 113,50,9: GO TO 6708
6705 CIRCLE 73,68,9: GO TO 6708
6706 CIRCLE 49,88,9
6708 INK 1
6710 RETURN
7000 GO SUB 9200
7010 PRINT AT 2,18;"Insurance? Y/N"
7020 PAUSE 0
7030 IF INKEY$="n" THEN RETURN
7040 DIM i(pl)
7045 FOR j=1 TO pl
7050 PRINT AT 2,18;"Player ";j;", "
7055 PRINT AT 3,18;"insurance? Y/N"
7060 PAUSE 0
7065 IF INKEY$="n" THEN GO TO 7098
7070 PRINT AT z(1,j),z(2,j);"I"
7075 LET i(j)=.5*b(j)
7080 PRINT AT j,4;" "
7085 LET p(j)=p(j)-i(j)
7090 PRINT AT j,4;p(j);
7095 IF p(j)<>INT p(j) THEN PRINT "0"
7098 NEXT j
7099 RETURN
7100 FOR u=1 TO pl
7101 IF i(u)<>0 THEN GO TO 7105
7102 NEXT u
7103 RETURN
7105 PRINT AT 4,18;"Insurance pays"
7110 FOR j=1 TO pl
7115 IF i(j)=0 THEN GO TO 7200
7120 PRINT AT 5,18;"player ";j
7130 PRINT AT 6,18;"$";2*i(j)
7140 PRINT AT j,4;" "
7150 LET p(j)=p(j)+2*i(j)
7160 PRINT AT j,4;p(j);
7170 IF p(j)<>INT p(j) THEN PRINT "0"
7180 PAUSE 80
7190 FOR k=5 TO 6: PRINT AT k,18;" ": NEXT k
7200 NEXT j
7210 RETURN
7300 PAPER 4: FOR n=0 TO 8: PRINT AT n,0;" ": NEXT n
7310 GO SUB 7500
7320 GO SUB 8000
7330 GO TO 70
7500 GO SUB 9200
7505 INK 2: PAPER 4
7510 FOR k=1 TO pl
7515 PRINT AT z(1,k),z(2,k);" "
7517 PRINT AT z(1,k)+1,z(2,k);" "
7520 FOR b=1 TO 6
7530 PRINT AT z(1,k)+6-b,z(2,k);" "
7535 PRINT AT z(1,k)+6-b,z(2,k)+INT (2.9-1/k);" "
7540 NEXT b
7550 NEXT k
7560 FOR k=14 TO 19
7570 PRINT AT 12,k;" "
7580 NEXT k
7582 INK 2
7585 CIRCLE 49,88,9: CIRCLE 73,68,9: CIRCLE 113,50,9
7590 CIRCLE 161,50,9: CIRCLE 199,68,9: CIRCLE 223,88,9
7595 INK 1
7599 RETURN
7999 GO TO 1500
8000 CLS
8010 BORDER 6: PAPER 6: INK 0
8015 PRINT AT 0,0;"Stake:"
8020 PRINT AT 2,12;"abc": PRINT AT 3,12;"def": PRINT AT 4,12;"ghi"
8030 PRINT AT 5,11;"njklm"
8040 PRINT AT 6,10;"n::::::::::m"
8050 PRINT AT 7,10;"::::::::::::::"
8070 PRINT AT 8,10;"o::q::r::p"
8075 RETURN
8076 PRINT AT 2,18;"CASINO ": PRINT AT 3,18;"BLACKJACK"
8077 PRINT AT 5,18;"* 1983,": PRINT AT 6,18;"T.H. Nooter"
8080 INK 2: PAPER 4: PRINT AT 9,2;"................ ........................::................"
8090 PAPER 4: PRINT AT 10,2;" "
8091 PRINT AT 11,3;" "
8092 FOR n=12 TO 14: PRINT AT n,3;" ": NEXT n
8094 FOR n=15 TO 16: PRINT AT n,4;" ": NEXT n
8095 PRINT AT 17,5;" "
8096 PRINT AT 18,6;" "
8097 PRINT AT 19,8;" "
8098 PRINT AT 20,9;" ::"
8105 INK 1: FOR n=0 TO 7
8110 PLOT 16+n,100: DRAW 95-n,-100+n,.5*PI
8120 DRAW 49,0
8130 DRAW 95-n,100-n,.5*PI
8140 NEXT n
9010 PAPER 4: INK 2: FOR n=0 TO 6: PLOT 80+n,96: DRAW 110-2*n,0,.75*PI: NEXT n
9020 PAPER 4: CIRCLE 49,88,9: CIRCLE 73,68,9: CIRCLE 113,50,9
9030 CIRCLE 161,50,9: CIRCLE 199,68,9: CIRCLE 223,88,9
9040 INK 5: PRINT AT 10,12;"The Silicon": PRINT AT 11,12;"Chip Casino"
9100 RETURN
9150 GO SUB 8000
9200 PAPER 4: INK 0
9205 FOR k=0 TO 8: PRINT AT k,17;" "
9210 NEXT k
9230 RETURN
9300 PAPER 4: INK 1: DIM b(pl)
9305 FOR n=1 TO pl: PAPER 6: PRINT AT 1,17;"Player ";n;","
9310 PRINT AT 2,17;"place your bet."
9315 PRINT AT 4,17;"($99 or less)"
9320 INPUT b(n)
9325 BORDER 6: PAPER 4: PAPER 4
9330 PRINT AT z(1,n),z(2,n);"$";b(n)
9335 LET p(n)=p(n)-b(n)
9340 PAPER 6: PRINT AT n,4;" ": PRINT AT n,0;n;". $";p(n);
9345 IF p(n)<>INT p(n) THEN PRINT "0"
9385 NEXT n
9390 RETURN
9400 DIM c$(8,pl+1)
9401 PRINT AT 3,19;"Dealing"
9403 FOR m=1 TO 2
9405 FOR n=1 TO pl+1
9410 LET crd=INT (RND*13)+1
9415 LET r(crd)=r(crd)+1
9416 IF r(crd)>24 THEN GO TO 9410
9417 LET deck=deck+1
9420 LET c(m,n)=crd
9430 IF crd<10 THEN LET c$(m,n)=CHR$ (48+crd)
9440 IF crd=10 THEN LET c$(m,n)="s"
9450 IF crd=11 THEN LET c$(m,n)="J"
9460 IF crd=12 THEN LET c$(m,n)="Q"
9470 IF crd=13 THEN LET c$(m,n)="K"
9480 IF crd=1 THEN LET c$(m,n)="A"
9490 NEXT n
9495 NEXT m
9500 FOR m=1 TO 2
9502 FOR n=1 TO pl
9504 INK 0: PRINT AT 8,12;"::": PAPER 6: INK 4: PRINT AT 9,11;"t"
9505 PAUSE 10
9506 INK 2: PAPER 4: PRINT AT 9,11;"..": INK 0: PAPER 6: PRINT AT 8,12;"q"
9512 IF (m+n)/2=INT ((m+n)/2) THEN GO TO 9518
9514 PAPER 7: INK 0
9515 GO TO 9520
9518 PAPER 7: INK 2
9520 PRINT AT z(1,n)+6-m,z(2,n);c$(m,n)
9545 PAPER 7: INK 2
9570 NEXT n
9580 PRINT AT 12,14;"u"
9590 NEXT m
9595 PRINT AT 12,15;c$(2,pl+1)
9596 IF c(2,pl+1)>10 THEN LET c(2,pl+1)=10
9597 LET s(pl+1,1)=c(2,pl+1)
9598 LET s(pl+1,2)=c(2,pl+1)
9599 IF s(pl+1,1)=1 THEN LET s(pl+1,2)=11
9600 RETURN
9700 LET a(n)=a(n)+1
9705 LET a=a+1
9710 LET crd=INT (RND*13)+1
9730 IF crd<10 THEN LET h$=CHR$ (48+crd)
9740 IF crd=10 THEN LET h$="s"
9750 IF crd=11 THEN LET h$="J"
9760 IF crd=12 THEN LET h$="Q"
9770 IF crd=13 THEN LET h$="K"
9780 IF crd=1 THEN LET h$="A"
9800 INK 0: PRINT AT 8,12;"::": PAPER 6: INK 4: PRINT AT 9,11;"t"
9810 PAUSE 10
9820 INK 2: PAPER 4: PRINT AT 9,11;"..": INK 0: PAPER 6: PRINT AT 8,12;"q"
9830 IF (h)/2=INT ((h)/2) THEN GO TO 9845
9835 PAPER 7: INK 0
9837 IF n>pl THEN GO TO 9900
9840 GO TO 9850
9845 PAPER 7: INK 2
9850 IF n>pl THEN GO TO 9900
9851 IF doub=1 THEN GO TO 9855
9852 IF pp>0 THEN RETURN
9855 PRINT AT z(1,n)+4-h,z(2,n);h$
9860 IF crd>10 THEN LET crd=10
9870 LET s(n,1)=s(n,1)+crd
9880 LET s(n,2)=s(n,2)+crd
9890 IF crd=1 THEN LET s(n,2)=s(n,2)+10
9895 IF s(n,2)>21 THEN GO TO 9897
9896 GO TO 9899
9897 LET s(n,2)=s(n,2)-10: GO TO 9895
9899 RETURN
9900 PAUSE 40: PRINT AT 12,14+a;h$
9902 GO SUB 9200
9905 LET m=pl+1
9907 IF crd>10 THEN LET crd=10
9910 LET s(m,1)=s(m,1)+crd
9912 LET s(m,2)=s(m,2)+crd
9915 IF s(m,1)=s(m,2) AND crd=1 THEN LET s(m,2)=s(m,1)+10
9935 IF s(m,2)>21 THEN LET s(m,2)=s(m,1)
9940 INK 1: PAPER 6: PRINT AT 1,18;"DEALER has ";s(m,2)
9945 IF s(m,2)>21 THEN GO TO 9960
9950 IF s(m,2)<17 THEN GO TO 9700
9955 GO TO 9970
9960 PRINT AT 2,18;"Dealer BUSTS!"
9970 PAUSE 90: GO TO 6000
9975 PRINT AT 2,18;"Dealer has ": PRINT AT 3,18;"BLACKJACK! "
9977 PAUSE 80: GO TO 6000
9980 PAUSE 90: GO SUB 9150
9982 PRINT AT 2,18;"New hand? Y/N"
9983 PAUSE 0: BORDER 6: PAPER 4
9984 IF INKEY$="n" THEN PRINT ''"Chips in the dip follows a dip in the chips. Complimentary snacks at the bar. "'';"CREDIT CARDS ACCEPTED": STOP
9985 GO SUB 7500
9986 IF deck>260 THEN GO TO 270
9988 GO TO 300
9996 LOAD /"BJ.COD"CODE 65368,168: GO TO 10
9997 STOP
9999 SAVE /"BJ" LINE 9996: SAVE /"BJ.COD"CODE 65368,168Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.
