
Originally Posted by
dareeldill
I am trying to write a formula for the game of baccarat. It has a notorious 3rd card rule to determine whether the "Banker" or the "Player" will take a third card.
The simplest way I can think to do this would basically be...
I have the Player Card in A1, The Banker Card in B1
I am trying to put if A1=0 & B1=0 Then ... "Display this text", if A1=0 & B1 = 1 Then... "Display this different text" and so on.
I can get parts of the formula, but every time I try to put it all together, I am getting errors.
Any chance you can help me? I feel like its easier than I'm making it.
I appreciate your help.
dareeldill,
I realize I am very late to this question, but I have the answer for you.
In the formulas below, I counted all 10's and faces as 0, and all totals are MOD10, so for example if the hand is a 9 and a 7, then the total is MOD(9+7,10) = 6.
Player 3rd card draw:
This formula returns TRUE if the player draws a 3rd card or FALSE if the player stands on the first two cards:
In this formula, J21 is the "natural flag": if the player's 2-card hand or the banker's 2-card hand (or both hands) is 8 or 9, then J21 is TRUE, else it's FALSE.
If a natural occurs, the player does not draw a 3rd card, so this formula returns FALSE.
Cell H21 contains the player's 2-card total: the player will draw a 3rd card (if no natural occurs) on totals of 5 or less (so the formula returns TRUE) and will
stand of totals of 6 or more (so the formula returns FALSE).
Banker 3rd card draw:
Baccarat banker's 3rd card draw rules are as follows:
- If a natural occurs, the banker does NOT draw a third card.
- If the bank's two-card total is 0, 1, or 2, the bank draws a third card.
- If the bank's two-card total is 3, the bank draws a third card if the player's third card is NOT an 8.
- If the bank's two-card total is 4, the bank draws a third card if the player's third card is NOT a 0, 1, 8, or 9.
- If the bank's two-card total is 5, the bank draws if the player's third card is a 4, 5, 6, or 7.
- If the bank's two-card total is 6 or more, the bank does NOT draw third card.
This formula returns TRUE if the banker draws a 3rd card or FALSE if the banker stands on the first two cards:
=IF(J21,FALSE,IF(I21<TRUNC((L21-10*TRUNC(L21/8))/2)+4,TRUE,FALSE))
In this formula, J21 is the "natural flag": if the player's 2-card hand or the banker's 2-card hand (or both hands) is 8 or 9, then J21 is TRUE, else it's FALSE.
If a natural occurs, the banker does not draw a 3rd card, so this formula returns FALSE.
Cell I21 contains the banker's 2-card total, and Cell L21 is either the value of the player's 3rd card (if drawn) or -16. If the weird portion
"I21<TRUNC((L21-10*TRUNC(L21/8))/2)+4" is TRUE, the banker will draw a 3rd card; if not, the banker will stand.
Hope this helps!
Dog Hand
Bookmarks