devklick/basic-blackjack

Bug: five card trick not awarded for player

devklick opened this issue ยท 2 comments

Player should have won with a five card trick, but instead they are still in play and have the option to stick or hit for a sixth card, which should not be allowed.

Possibly related to #24 (late night coding on phone...)

image

๐ŸŽ‰ This issue has been resolved in version 0.5.2 ๐ŸŽ‰

The release is available on GitHub release

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€

Now fixed.

The bug was indeed caused by #24. Rather than checking the full set of cards (including the new card) for a five card trick, I was only checking the existing cards, meaning that when the player had 5 cards on the table, the code was checking for a five card trick against only the first four cards.

image