nightisyang / basic-poker

My first coding project. Fully featured Poker game. Vanilla JS, HTML, CSS.
0 stars 0 forks source link

stalemate still possible if players have same cards - find kicker to break tie #15

Closed nightisyang closed 2 years ago

nightisyang commented 2 years ago

Kickers take on special importance in Texas hold 'em, because a common winning hand is one card in a player's hand matched with a card on the board, while the player's second card acts as a kicker. For example, if one player holds A-8, a second player holds A-7, and the board is A-K-6-5-4, the player with the A-8 will outkick the player with the A-7, since A-8's best hand is A-A-K-8-6, while the A-7's hand is A-A-K-7-6. However, if the board held A-K-Q-J-3, the players would tie, because both would play the hand A-A-K-Q-J; in this case it is said that the players' kickers "don't play", or that the "kicker on the board plays". In this case, there would be a split pot.

source: https://en.wikipedia.org/wiki/Kicker_(poker)

nightisyang commented 2 years ago

A player may use both of their own two hole cards, only one, or none at all, to form their final five-card hand. If the five community cards form the player's best hand, then the player is said to be playing the board and can only hope to split the pot, because each other player can also use the same five cards to construct the same hand.[10]

If the best hand is shared by more than one player, then the pot is split equally among them, with any extra chips going to the first players after the button in clockwise order. It is common for players to have closely valued, but not identically ranked hands. Nevertheless, one must be careful in determining the best hand; if the hand involves fewer than five cards, (such as two pair or three of a kind), then kickers are used to settle ties (see the second example below). The card's numerical rank is of sole importance; suit values are irrelevant in hold 'em.

source: https://en.wikipedia.org/wiki/Texashold%27em#The_showdown