|
PrestoPimp Apprentice
Joined: 18 Sep 2001 Posts: 175 Location: USA
|
Posted: Mon Sep 22, 2003 2:25 pm
Lightbulb |
Hey Lightbulb I sent you an email about my script I was wondering if you got it.
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Sep 22, 2003 4:53 pm |
I guess I'll have to check my email.
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Sep 22, 2003 5:54 pm |
Okay, I found it. I've never done a blackjack bot that I remember. If I did, I'd probably count the aces as 1, but make a note if a player (including the dealer) has an ace (#VAR P1Aces 1) and then check the value + 10 first. You'd never want to add 20 to a hand, so it doesn't matter if a player has more than one ace.
#IF ((@P1Aces > 0) AND (@P1Total + 10 < 22)) {evaluate (@P1Total + 10)} {evaluate @P1Total} |
|
|
|
PrestoPimp Apprentice
Joined: 18 Sep 2001 Posts: 175 Location: USA
|
Posted: Mon Sep 22, 2003 7:41 pm |
Okay.. and how about why it doesnt add anything if the players first hit if it is a Jack,Queen,or King?
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Sep 22, 2003 8:12 pm |
Why would you expect it to change if the player's first hit is Jack, Queen, or King?
If the player has an Ace, the Ace can be counted as either 1 or 11.
If one (or both) of the player's first two cards is an Ace, and the player doesn't have blackjack, the player's hand will be worth 12 to 20 because the first Ace will be counted as 11 and the other card will be worth 1 (second Ace) to 9.
If the player's first hit (third card) is a Jack, Queen, or King (or Ten) the player's hand will still be worth 12 to 20 because the first Ace will now be counted as 1.
The value of a blackjack hand isn't supposed to change if it contains an Ace and the first hit is a face card or Ten. |
|
|
|
PrestoPimp Apprentice
Joined: 18 Sep 2001 Posts: 175 Location: USA
|
Posted: Mon Sep 22, 2003 8:44 pm |
I know that, but the thing is.. if the person has a ten and a five.. and then they hit on 15 and draw a queen.. it wont add 10 and total 25.. for some reason it will say.. "your total is 15" after the queen is drawn.. it only does this on the first draw and only if the card drawn is jack,queen,king and it would make it go bust.
Thanks |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Sep 22, 2003 10:27 pm |
It would appear you are counting aces as 11 and then subtracting 10 whenever the total goes over 21. It also appears you messed up the logic somewhere, so that 10 gets subtracted even when there aren't any aces. Your email didn't show where. You probably didn't clear one of your ace variables.
This is the opposite of the approach I suggested, which is to count aces as 1. I would only add the 10 when it's needed for display, comparing hands to determine the winner, or (for the dealer's hand) determining whether to hit or stay. In all cases, I'd leave the actual variable with the aces counted as 1. |
|
|
|
PrestoPimp Apprentice
Joined: 18 Sep 2001 Posts: 175 Location: USA
|
Posted: Mon Sep 22, 2003 11:51 pm |
alrighty i'll try it thanks.
|
|
|
|
|
|