[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 1 and/or 2 Player BlackJack Game Written in AppleSoft Basic With Source Code



On Saturday, January 12, 2013 2:10:43 PM UTC-7, creative...@gmail.com wrote:
> On Friday, 11 January 2013 23:18:48 UTC-6, gid...@sasktel.net  wrote:
> 
> > I see you used the cards and the graphic routines from the Nibble magazine that featured the card game Pyramid.
> 
> > 
> 
> > 
> 
> > 
> 
> > You should be giving credit to the person who wrote those card routines.
> 
> > 
> 
> > 
> 
> > 
> 
> > Please do not credit yourself as being your own.
> 
> 
> 
> I did give credit to the original guy.

You should probably give him credit for the BASIC code too, since you just replaced his name with yours -- everything else is the same.

Here's the first few lines of code as printed in the March 1992 Nibble article, "BLACKJACK":

 1  REM  *************************
 2  REM  * BLACKJACK             *
 3  REM  * BY JOHN GATES         *
 4  REM  * COPYRIGHT (C) 1991    *
 5  REM  * MINDCRAFT PUBL. CORP. *
 6  REM  * LINCOLN, MA 01773     *
 7  REM  *************************
 10  DIM D%(104),H%(104)
 20  TEXT : HOME : VTAB 12: PRINT "Loading Files - Please Wait!"
 30  IF  PEEK (104) = 64 THEN 50
 40  POKE 104,64: POKE 16384,0: PRINT  CHR$ (4)"RUN BLACKJACK"
 50  PRINT  CHR$ (4)"BLOAD BLACKJACK.SHAPE": PRINT  CHR$ (4)"BLOAD BLACKJACK.ML,A$800": PRINT  CHR$ (4)"BLOAD BLACKJACK.SCRN"
 60  TEXT : HOME : VTAB 2: HTAB 9: PRINT "***********************": HTAB 9: PRINT "*" SPC( 21)"*": HTAB 9: PRINT "*  B L A C K J A C K  *": REM   23 '*'
 70  HTAB 9: PRINT "*" SPC( 21)"*": HTAB 9: PRINT "***********************": REM   23'*' 
 80  VTAB 8: HTAB 19: PRINT "By": PRINT : HTAB 15: PRINT "John Gates": PRINT : HTAB 12: PRINT "Copyright (C) 1991": HTAB 11: PRINT "MindCraft Publ. Corp.": HTAB 12: PRINT "Lincoln, MA  01773"
 90  VTAB 17: HTAB 17: PRINT "Cards": HTAB 18: PRINT "By": PRINT : HTAB 15: PRINT "Jim Lazar": VTAB 23: HTAB 8: PRINT "Press Return to Continue";: GET RE$
 100  HOME : VTAB 12: HTAB 4: PRINT "Be Sure The Caps Lock Key Is Down!": VTAB 23: HTAB 8: PRINT "Press Return to Continue";: GET RE$
 110  TEXT : HOME : VTAB 9: HTAB 13: PRINT "B L A C K J A C K": VTAB 13: HTAB 13: PRINT "1. Instructions": PRINT : HTAB 13: PRINT "2. Play Game"
 120  VTAB 23: HTAB 13: PRINT "Choose Number!";: GET A$
 130  IF  VAL (A$) < 1 OR  VAL (A$) > 2 THEN  PRINT  CHR$ (7);: GOTO 120
 140  IF  VAL (A$) = 2 THEN 320
 150  HOME : HTAB 10: PRINT "I N S T R U C T I O N S": HTAB 9: PRINT "_________________________": REM  25'_'
 160  VTAB 4: PRINT "Blackjack is a one or two player game": PRINT "that pits your gambling skills against": PRINT "those of the 'House' (Dealer)."
 170  PRINT : PRINT "The object of the game is to come as": PRINT "close to 21 as possible, without going": PRINT "over, and to beat the House."
 180  VTAB 12: PRINT "You can receive up to five cards.": PRINT "In case of a tie, the House wins."
 190  VTAB 15: PRINT "Blackjack (a Jack and an Ace) is worth": PRINT "1.5 times your bet rounded down to the": PRINT "nearest dollar.": PRINT 
 200  PRINT "Five cards under 21 is worth 2 times": PRINT "your bet."
 210  VTAB 24: HTAB 8: PRINT "Press Return to Continue";: GET RE$: HOME 
 220  PRINT "The House must take a card on a": PRINT "count of 16 or under, and must stay on": PRINT "a count of 17 or over."
 230  PRINT : PRINT "You'll be given $1000 to play with.": HTAB 10: PRINT "(Pretend of course!)": PRINT : PRINT "Your bets must be between $1 and $99": PRINT "and must be whole dollars only."
 240  PRINT : PRINT "On your turn you will be prompted to": PRINT "place your bet.  If you have made a": PRINT "previous bet, that bet will be shown as": PRINT "the default.  To accept your previous"
 250  PRINT "bet, just press Return.  If you wish": PRINT "to make a different bet, just enter it": PRINT "and press Return."
 260  PRINT : PRINT "On your turn you will be given": PRINT "the option of, turn your down card,": PRINT "take a card, double your bet, or split": PRINT "if your cards are of equal value."
 270  VTAB 24: HTAB 8: PRINT "Press Return to Continue";: GET RE$
 280  HOME : PRINT "If you chose to double, your bet": PRINT "will be rededucted and you will be": PRINT "given only one card."
 290  PRINT : PRINT "If you chose to split, your bet": PRINT "will be rededucted and you will be": PRINT "dealt an extra hand to play."
 300  VTAB 18: HTAB 14: PRINT "GOOD  LUCK!"
 310  VTAB 24: HTAB 8: PRINT "Press Return to Continue";: GET RE$
 320  HOME : VTAB 9: HTAB 10: PRINT "Up to two players may": HTAB 9: PRINT "play against the 'House'."
 330  VTAB 14: HTAB 5: PRINT "How many players will be playing?": VTAB 16: HTAB 20: GET PL$: IF  VAL (PL$) < 1 OR  VAL (PL$) > 2 THEN  VTAB 16: CALL  - 868: PRINT  CHR$ (7);: GOTO 330
 340  REM **DRAW PLAYING TABLE**
 350  POKE 232,0: POKE 233,25: SCALE= 1: ROT= 0: HGR 
 360  HCOLOR= 3: DRAW 1 AT 85,13: HCOLOR= 6: DRAW 1 AT 83,13
 370  DRAW 3 AT 2,50: DRAW 3 AT 1,50
 380  IF  VAL (PL$) = 2 THEN  DRAW 4 AT 2,95: DRAW 4 AT 1,95
 390  DRAW 2 AT 2,140: DRAW 2 AT 3,140
 400  DRAW 5 AT 78,16: DRAW 5 AT 79,16
 410  DRAW 6 AT 251,115
 420  VTAB 22: HTAB 1: PRINT "\______________________________________/": REM  38 '_'

and the code from your disk image:

 10  DIM D%(104),H%(104)
 20  TEXT : HOME : VTAB 12: PRINT "Loading Files - Please Wait!"
 30  IF  PEEK (104) = 64 THEN 50
 40  POKE 104,64: POKE 16384,0: PRINT  CHR$ (4)"RUN BLACKJACK"
 41  REM  CTRL-G
 50  PRINT  CHR$ (4)"BLOAD BLACKJACK.SHAPE": PRINT  CHR$ (4)"BLOAD BLACKJACK.ML,A$800": PRINT  CHR$ (4)"BLOAD BLACKJACK.SCRN"
 60  TEXT : HOME : VTAB 2: HTAB 9: PRINT "***********************": HTAB 9: PRINT "*" SPC( 21)"*": HTAB 9: PRINT "*  B L A C K J A C K  *": REM     23 '*'
 70  HTAB 9: PRINT "*" SPC( 21)"*": HTAB 9: PRINT "***********************": REM     23'*' 
 80  VTAB 8: HTAB 19: PRINT "By": PRINT : HTAB 15: PRINT "Michael Hardy": PRINT : HTAB 12: PRINT "Copyright (C) 1989": HTAB 11: PRINT " Hardy Creations Inc.": HTAB 12: PRINT "Cuba Missouri, 65453"
 90  VTAB 17: HTAB 17: PRINT "Cards": PRINT : HTAB 18: PRINT " BY": PRINT : HTAB 15: PRINT "Carl Brewer": VTAB 23: HTAB 8: PRINT "Press Return to Continue";: GET RE$
 100  HOME : VTAB 12: HTAB 4: PRINT "Be Sure The Caps Lock Key Is Down!": VTAB 23: HTAB 8: PRINT "Press Return to Continue";: GET RE$
 102  REM  WITH BYE & ONERR & CAT
 105  REM  JEFF HURLBURT, 1987-1999
 107  REM 
 110  TEXT : HOME : VTAB 9: HTAB 13: PRINT "B L A C K J A C K !": VTAB 13: HTAB 13: PRINT "1. Instructions?": PRINT : HTAB 13: PRINT "2. Play The Game!": PRINT : HTAB 13: PRINT "3. Credits!!!": PRINT : HTAB 13: PRINT "4. Quit To ProDos..."
 120  VTAB 23: HTAB 13: PRINT "Choose Number!";: GET A$
 130  IF  VAL (A$) < 1 OR  VAL (A$) > 4 THEN  PRINT  CHR$ (7);: GOTO 120
 135  IF  VAL (A$) = 1 THEN  GOTO 150
 140  IF  VAL (A$) = 2 THEN 320
 144  IF  VAL (A$) = 3 THEN  GOTO 4361
 145  IF  VAL (A$) = 4 THEN  GOTO 146
 146  VTAB 23: HTAB 2: PRINT "You Sure You Want To Quit To Basic?": PRINT : PRINT "PRESS 'Y' FOR YES OR 'N' FOR NO (Y/N)";: GET AN$
 147  IF AN$ <  >  CHR$ (89) AND AN$ <  >  CHR$ (121) AND AN$ <  >  CHR$ (78) AND AN$ <  >  CHR$ (110) THEN  PRINT  CHR$ (7);: VTAB 23: HTAB 1: CALL  - 868: GOTO 4190
 148  IF AN$ = "Y" OR AN$ = "y" THEN  TEXT : HOME : PRINT : PRINT  CHR$ (4)"RUN HELLO"
 149  IF AN$ = "N" OR AN$ = "n" THEN  VTAB 23: HTAB 1: GOTO 110
 150  HOME : HTAB 10: PRINT "I N S T R U C T I O N S": HTAB 9: PRINT "_________________________": REM    25'_'
 160  VTAB 4: PRINT "Blackjack is a one or two player game": PRINT "that pits your gambling skills against": PRINT "those of the 'House' (Dealer)."
 170  PRINT : PRINT "The object of the game is to come as": PRINT "close to 21 as possible, without going": PRINT "over, and to beat the House."
 172  REM 
 173  REM  EXAMPLES:
 175  REM  1010 DATA UTIL.SYSTEM (COPY II PLUS 7.1)
 177  REM  1020 DATA BLOCK.WARDEN
 180  VTAB 12: PRINT "You can receive up to five cards.": PRINT "In case of a tie, the House wins."
 190  VTAB 15: PRINT "Blackjack (a Jack and an Ace) is worth": PRINT "1.5 times your bet rounded down to the": PRINT "nearest dollar.": PRINT 
 200  PRINT "Five cards under 21 is worth 2 times": PRINT "your bet."
 210  VTAB 24: HTAB 8: PRINT "Press Return to Continue";: GET RE$: HOME 
 220  PRINT "The House must take a card on a": PRINT "count of 16 or under, and must stay on": PRINT "a count of 17 or over."
 230  PRINT : PRINT "You'll be given $1000 to play with.": HTAB 10: PRINT "(Pretend of course!)": PRINT : PRINT "Your bets must be between $1 and $99": PRINT "and must be whole dollars only."
 240  PRINT : PRINT "On your turn you will be prompted to": PRINT "place your bet.  If you have made a": PRINT "previous bet, that bet will be shown as": PRINT "the default.  To accept your previous"
 250  PRINT "bet, just press Return.  If you wish": PRINT "to make a different bet, just enter it": PRINT "and press Return."
 260  PRINT : PRINT "On your turn you will be given": PRINT "the option of, turn your down card,": PRINT "take a card, double your bet, or split": PRINT "if your cards are of equal value."
 270  VTAB 24: HTAB 8: PRINT "Press Return to Continue";: GET RE$
 280  HOME : PRINT "If you chose to double, your bet": PRINT "will be rededucted and you will be": PRINT "given only one card."
 290  PRINT : PRINT "If you chose to split, your bet": PRINT "will be rededucted and you will be": PRINT "dealt an extra hand to play."
 300  VTAB 18: HTAB 14: PRINT "GOOD  LUCK!"
 310  VTAB 24: HTAB 8: PRINT "Press Return to Continue";: GET RE$: GOTO 110
 320  HOME : VTAB 9: HTAB 10: PRINT "Up to two players may": HTAB 9: PRINT "play against the 'House'."
 330  VTAB 14: HTAB 5: PRINT "How many players will be playing?": VTAB 16: HTAB 20: GET PL$: IF  VAL (PL$) < 1 OR  VAL (PL$) > 2 THEN  VTAB 16: CALL  - 868: PRINT  CHR$ (7);: GOTO 330
 340  REM   **DRAW PLAYING TABLE**
 350  POKE 232,0: POKE 233,25: SCALE= 1: ROT= 0: HGR 
 360  HCOLOR= 3: DRAW 1 AT 85,13: HCOLOR= 6: DRAW 1 AT 83,13
 370  DRAW 3 AT 2,50: DRAW 3 AT 1,50
 380  IF  VAL (PL$) = 2 THEN  DRAW 4 AT 2,95: DRAW 4 AT 1,95
 390  DRAW 2 AT 2,140: DRAW 2 AT 3,140
 400  DRAW 5 AT 78,16: DRAW 5 AT 79,16
 410  DRAW 6 AT 251,115
 420  VTAB 22: HTAB 1: PRINT "\______________________________________/": REM    38 '_'


- Mike