In the call
function of the TwentyOne.sol contract, a standThreshold
variable was used to determine if the dealer takes a "hit" or "stand". But the standard blackjack rule is the the dealer takes a hit if their hand is any value lower than 17 and they take a stand if their hand is 17 or higher.
It could be seen that there was an attempt to generate a random number between 17 and 21 and use that variable as the standThreshold
but there is zero need for this variable as it does nothing but antagonise the rule of the blackjack game
It puts the players at risk of losing when they should be winning. The standThreshold
gives the dealer the ability to hit when they should stand. This could take their hand above the players' and help them win. It deviates from the rule of blackjack with the introduction of standThreshold
.
Manual review, ChatGPT
The call
function should be modified so that the standThreshold
variable ceases to exist and it should be changed to 17
where the variable was used in the function.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.