cls:print:print print " LAS VEGAS RED DOG" rem Adapted by Mark Damron rem from ACEY DUCEY in rem David Ahl's BASIC COMPUTER GAMES print print input "Instructions (y=1, n=0 or )";try if try <>0 then try=0:goto 100 cls:goto 105 100 cls:print "RED DOG is an exciting, fast paced and" print "easy to play game that is often called" print "Acey-Ducey or In-Between." gosub 1100 print "Two cards are dealt face up. If the two" print "cards are not consecutive or a pair," print "the dealer will announce the 'spread'," print "or number of cards that fall between" print "the two original cards." gosub 1100 print "At that point you may raise your bet up" print "to the amount of your original bet." gosub 1100 print "The dealer will then turn up a third" print "card. You win if the value of this" print "card is between the values of the" print "first two cards." gosub 1100 print "Payoffs are made according to the" print "number of cards in the spread." gosub 1100 print "If the spread consists of only one card" print "the bet pays 5 to 1. For a two card" print "spread, the bet pays 4 to 1." gosub 1100 print "For a three card spread, the bet pays" print "2 to 1. For a spread of between 4 and" print "11, the payoff is 1 to 1." gosub 1100 print "If the first two cards are consecutive" print "the hand is a tie, you do not win or" print "lose, and the third card is not drawn." gosub 1100 print "If the first two cards are a pair, you" print "may not raise your bet. A third card" print "is drawn, and, if it makes three of a" print "kind you win 11 times your bet." gosub 1100 print "If the card does not make three of a" print "kind, the hand is a tie and you do not" print "win or lose." print:print "To quit input a negative bet." gosub 1100 rem this is the 6 deck version 105 dim deck(312) 110 bank=100 115 for i=0 to 311:deck(i)=1:next i count=0:randomize 260 if count<200 then goto 270 print "Reshuffling":goto 115 270 locate 1,1 : print "Bank = ";bank : print "Last Bet = ";bet : oldb = bet print "Press to use Last Bet" input "What is your bet";bet if bet<=bank then goto 280 cls:print "You don't have that much!" goto 270 280 cls if bet=0 then bet = oldb if bet<0 then goto 990 gosub 1200:first=card:index=1 gosub 1200:second=card:index=2 third=0 spread=abs(first-second) rem spread is one more than real spread if spread >1 then goto 290 gosub 1300 if spread=0 then mult=11:goto 730 if spread=1 then mult=1:print "Tie - consecutive cards.":goto 976 290 if spread=2 then mult=5 if spread=3 then mult=4 if spread=4 then mult=2 if spread>4 then mult=1 gosub 1300 700 rem print "You can raise up to your original bet." locate 7,1:input "Raise bet, 0 or to not raise"; bet2 if bet2<=bank-bet then goto 710 cls:gosub 1300:print "You don't have that much." goto 700 710 if bet2>bet then cls:gosub 1300:goto 700 bet=bet+bet2 730 gosub 1200:third=card:temp=third gosub 1300 locate 5,1 rem calculates win or lose if first<>second then goto 920 if third<>first then print "Tie - non three of a kind.":goto 976 if third<>second then print "Tie - non three of a kind.":goto 976 print "Three of a kind!!":goto 960 920 if first>second then goto 950 if third<=first then goto 970 if third>=second then goto 970 goto 960 950 if third>=first then goto 970 if third<=second then goto 970 960 print "You win!! Pays ";mult*bet;"." bank=bank+bet*mult:goto 976 970 print "Sorry, you lose ";bet;".":bank=bank-bet if bank=0 then goto 980 else goto 976 976 gosub 1100:goto 260 980 print "Sorry, you're broke!!" 990 input "Try again (y=1, n=0 or )";try if try<>1 then goto 995 cls:goto 110 995 cls:print "Thanks for playing!" if bank<=100 then goto 996 print "You won ";bank-100;" dollars!" goto 1400 996 if bank<>100 then goto 997 print "You broke even!":goto 1400 997 print "You lost ";100-bank;" dollars." goto 1400 1000 rem prints card names on index goto 1010, 1020, 1030 1010 box 1,25,3,29,0 : locate 2,27 if temp<11 then print temp;:return if temp=11 then print "J";:return if temp=12 then print "Q";:return if temp=13 then print "K";:return print "A";:return 1020 box 1,35,3,39,0 : locate 2,37 if temp<11 then print temp;:return if temp=11 then print "J";:return if temp=12 then print "Q";:return if temp=13 then print "K";:return print "A";:return 1030 box 4,30,6,34,0 : locate 5,32 if temp<11 then print temp;:return if temp=11 then print "J";:return if temp=12 then print "Q";:return if temp=13 then print "K";:return print "A";:return 1100 rem screen display wait locate 8,1:print "Press any key to continue."; wait:cls:return 1200 rem gets card from deck rem for multiple decks change line 1210 and x, initialization in 115 rem and re-dimension deck() and change reshuffle in line 360 1210 card=int(6*52*rnd) if deck(card)=0 then goto 1210 deck(card)=0:count=count+1 rem offset for 2 to ace card=card+2:suit=1 rem x is (#cards/13) - 1 I think for x=23 to 1 step -1 if card>13*x+1 then card=card-13:suit=suit+1 next x rem suit=1,2,3,4==club,diamond,heart,spade rem suits not used currently return 1300 rem print subroutine rem cls locate 1,1 if bet<>0 then goto 1310 else print "Bank = ";bank;".":goto 1315 1310 print "Bank = "; bank : print "Your bet is ";bet;"." 1315 index=1:temp=first:gosub 1000 index=2:temp=second:gosub 1000 locate 3,1 : print "The spread is" if spread <2 then goto 1330 if spread>4 then goto 1320 if spread =2 then print "1 card. Pays 5:1.":goto 1330 print spread -1;" cards. Pays ";mult; ":1." goto 1330 1320 print "4 to 11 cards. Pays 1:1." 1330 if third=0 then goto 1390 index=3:temp=third:gosub 1000 1390 return 1400 print "Hope you had fun!":end