Update rules
This commit is contained in:
parent
1e0f50c1a7
commit
dfca353b2a
@ -194,6 +194,11 @@ def getHardHandDecision(dealerCard, playerCardsVal, playerCardsNum):
|
|||||||
"IF (playerCardsValue IS medium) AND (dealerCardValue IS high) THEN (decision IS hit)",
|
"IF (playerCardsValue IS medium) AND (dealerCardValue IS high) THEN (decision IS hit)",
|
||||||
"IF (playerCardsValue IS medium) AND (dealerCardValue IS very_high) THEN (decision IS hit)",
|
"IF (playerCardsValue IS medium) AND (dealerCardValue IS very_high) THEN (decision IS hit)",
|
||||||
"IF (playerCardsValue IS high) AND (dealerCardValue IS very_high) THEN (decision IS hit)",
|
"IF (playerCardsValue IS high) AND (dealerCardValue IS very_high) THEN (decision IS hit)",
|
||||||
|
"IF (playerCardsValue IS very_high) THEN (decision IS stand)",
|
||||||
|
"IF (playerCardsValue IS high) AND (dealerCardValue IS high) THEN (decision IS stand)",
|
||||||
|
"IF (playerCardsValue IS medium) AND (dealerCardValue IS low) THEN (decision IS stand)",
|
||||||
|
"IF (playerCardsValue IS high) AND (dealerCardValue IS low) THEN (decision IS stand)",
|
||||||
|
"IF (playerCardsValue IS very_high) AND (dealerCardValue IS low) THEN (decision IS stand)",
|
||||||
])
|
])
|
||||||
|
|
||||||
else:
|
else:
|
||||||
@ -202,6 +207,11 @@ def getHardHandDecision(dealerCard, playerCardsVal, playerCardsNum):
|
|||||||
"IF (playerCardsValue IS medium) AND (dealerCardValue IS high) THEN (decision IS hit)",
|
"IF (playerCardsValue IS medium) AND (dealerCardValue IS high) THEN (decision IS hit)",
|
||||||
"IF (playerCardsValue IS medium) AND (dealerCardValue IS very_high) THEN (decision IS hit)",
|
"IF (playerCardsValue IS medium) AND (dealerCardValue IS very_high) THEN (decision IS hit)",
|
||||||
"IF (playerCardsValue IS high) AND (dealerCardValue IS very_high) THEN (decision IS hit)",
|
"IF (playerCardsValue IS high) AND (dealerCardValue IS very_high) THEN (decision IS hit)",
|
||||||
|
"IF (playerCardsValue IS very_high) THEN (decision IS stand)",
|
||||||
|
"IF (playerCardsValue IS high) AND (dealerCardValue IS high) THEN (decision IS stand)",
|
||||||
|
"IF (playerCardsValue IS medium) AND (dealerCardValue IS low) THEN (decision IS stand)",
|
||||||
|
"IF (playerCardsValue IS high) AND (dealerCardValue IS low) THEN (decision IS stand)",
|
||||||
|
"IF (playerCardsValue IS very_high) AND (dealerCardValue IS low) THEN (decision IS stand)",
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
@ -288,6 +298,11 @@ def getSoftHandDecision(dealerCard, playerCardsVal, playerCardsNum):
|
|||||||
"IF (playerCardsValue IS medium) AND (dealerCardValue IS high) THEN (decision IS hit)",
|
"IF (playerCardsValue IS medium) AND (dealerCardValue IS high) THEN (decision IS hit)",
|
||||||
"IF (playerCardsValue IS medium) AND (dealerCardValue IS very_high) THEN (decision IS hit)",
|
"IF (playerCardsValue IS medium) AND (dealerCardValue IS very_high) THEN (decision IS hit)",
|
||||||
"IF (playerCardsValue IS high) AND (dealerCardValue IS very_high) THEN (decision IS hit)",
|
"IF (playerCardsValue IS high) AND (dealerCardValue IS very_high) THEN (decision IS hit)",
|
||||||
|
"IF (playerCardsValue IS very_high) THEN (decision IS stand)",
|
||||||
|
"IF (playerCardsValue IS high) AND (dealerCardValue IS high) THEN (decision IS stand)",
|
||||||
|
"IF (playerCardsValue IS medium) AND (dealerCardValue IS low) THEN (decision IS stand)",
|
||||||
|
"IF (playerCardsValue IS high) AND (dealerCardValue IS low) THEN (decision IS stand)",
|
||||||
|
"IF (playerCardsValue IS very_high) AND (dealerCardValue IS low) THEN (decision IS stand)",
|
||||||
])
|
])
|
||||||
|
|
||||||
else:
|
else:
|
||||||
@ -296,6 +311,11 @@ def getSoftHandDecision(dealerCard, playerCardsVal, playerCardsNum):
|
|||||||
"IF (playerCardsValue IS medium) AND (dealerCardValue IS high) THEN (decision IS hit)",
|
"IF (playerCardsValue IS medium) AND (dealerCardValue IS high) THEN (decision IS hit)",
|
||||||
"IF (playerCardsValue IS medium) AND (dealerCardValue IS very_high) THEN (decision IS hit)",
|
"IF (playerCardsValue IS medium) AND (dealerCardValue IS very_high) THEN (decision IS hit)",
|
||||||
"IF (playerCardsValue IS high) AND (dealerCardValue IS very_high) THEN (decision IS hit)",
|
"IF (playerCardsValue IS high) AND (dealerCardValue IS very_high) THEN (decision IS hit)",
|
||||||
|
"IF (playerCardsValue IS very_high) THEN (decision IS stand)",
|
||||||
|
"IF (playerCardsValue IS high) AND (dealerCardValue IS high) THEN (decision IS stand)",
|
||||||
|
"IF (playerCardsValue IS medium) AND (dealerCardValue IS low) THEN (decision IS stand)",
|
||||||
|
"IF (playerCardsValue IS high) AND (dealerCardValue IS low) THEN (decision IS stand)",
|
||||||
|
"IF (playerCardsValue IS very_high) AND (dealerCardValue IS low) THEN (decision IS stand)",
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
@ -340,7 +360,9 @@ def getDecision(dealerCard, playerCards, isPair):
|
|||||||
Returns:
|
Returns:
|
||||||
str: decision
|
str: decision
|
||||||
"""
|
"""
|
||||||
|
print(dealerCard)
|
||||||
|
print(playerCards)
|
||||||
|
print(isPair)
|
||||||
playerCardsNum = len(playerCards)
|
playerCardsNum = len(playerCards)
|
||||||
if 1 in playerCards: # soft hand
|
if 1 in playerCards: # soft hand
|
||||||
playerCardsVal = sum([x if x != 1 else 10 for x in playerCards])
|
playerCardsVal = sum([x if x != 1 else 10 for x in playerCards])
|
||||||
|
Loading…
Reference in New Issue
Block a user