Stardew valley mini game (modified version of blackjack).
The objective is to score higher than the dealer without exceeding 21.
The player and the dealer are both dealt two cards, the first valued between 1 and 11, the second between 1 and 9. The dealer's first card is hidden while the player takes their actions.
The player can then choose to stay, keeping their current total, or hit, drawing a new card valued between 1 and 9. This is repeated until the player exceeds 21, a "bust", for an immediate loss; makes a total of exactly 21, a "CalicoJack", for an immediate win; or chooses to stay.
If the player stays, the dealer's hidden card is displayed. The dealer will then take additional cards (normally valued between 1 and 9, but can be higher if the player has a total of 18 or greater) until they either bust, or have a total of 18 or higher that is at least as high as the player's total. If the dealer busts, the player wins; if the dealer has a higher total than the player but no greater than 21, the player loses; if the player and dealer have the same total, the game is a draw.