Dashboard > Sample Texas Hold 'Em - XP Day Montreal > ... > Programmer Tests > Compare Seven Card Hands
  Sample Texas Hold 'Em - XP Day Montreal Log In View a printable version of the current page.  
  Compare Seven Card Hands
Added by greenpepper, last edited by François Beauregard on Oct 01, 2007  (view change)
Labels: 

Import
info.xpday.poker.fixture

Since we're playing seven-card, we need to compare seven-card hands, rather than standard five-card hands.

If you don't know the standard rankings, the reference is here: .RuleBook.HandRankings

Comparing hands of different ranks

rule for comparing seven card hands
first second winner? comment
2s,3d,4c,5h,7s,8d,Jh 3d,3c,4h,5s,7h,8s,Tc second pair beats high card
2s,2d,3c,3h,7s,8d,Jh Ad,Ac,4h,5s,7h,8s,Tc first two pair beats pair
2s,2h,3c,3h,7s,8d,Jh 2d,3c,4h,5s,7h,8s,Ac first two pair beats high card

Comparing hands of the same rank, "kickers" are involved. A kicker is a card not part of a pair, set or four-of-a-kind.

High card (no pair)

rule for comparing seven card hands
first second winner? comment
2s,3d,4c,5h,7s,8d,9h 2d,3c,4h,5s,7h,8s,Tc second high card
2s,3d,4c,5h,7s,8d,Jh 2d,3c,4h,5s,7h,8s,Tc first
2s,3d,4c,5h,7s,8d,Jh 9d,3c,4h,5s,7h,8s,Tc first
2s,3d,4c,5h,7s,8d,Jh 9d,3c,4h,5s,7h,8s,Ac second ace as high card
2s,3d,4c,5h,7s,8d,Jh 2d,3c,4h,5s,7d,9h,Js second high card ties, go to kicker
2s,3d,5c,7h,8s,9d,Jh 2d,3c,4h,7s,8d,9h,Js first high cards tie, fifth card is the kicker
2s,4d,5c,7h,8s,9d,Jh 2d,3c,5h,7s,8d,9h,Js tied five cards tie, ignore sixth

Pair

rule for comparing seven card hands
first second winner? comment
2s,3d,4c,5h,7s,Jd,Jh 3d,3c,4h,5s,7h,8s,Tc first high pair beats low pair
2s,3d,4c,5h,7s,Jd,Jh Js,Jc,4h,5s,7h,8s,Tc tied pairs tie, go to kicker
2s,3d,6c,8h,Ts,Jd,Jh Js,Jc,4h,5s,7h,8s,Tc tied pairs tie, fifth card is the kicker
2s,3d,7c,8h,Ts,Jd,Jh Js,Jc,4h,5s,7h,8s,Tc tied pairs tie, three kickers tie, ignore sixth card

Two Pair

rule for comparing seven card hands
first second winner? comment
2s,3d,4c,5h,5s,8d,8h 2s,3d,8c,4h,4c,Jd,Jh second higher high pair beats lower high pair
2s,3d,4c,5h,5s,Jc,Js 2s,3d,8c,4h,4c,Jd,Jh first high pairs tied; compare low pairs
2s,3d,Qc,4h,4s,Jc,Js 2s,3d,8c,4h,4c,Jd,Jh first both pairs match; compare kickers

Three of a kind ("set")

rule for comparing seven card hands
first second winner? comment
2s,3d,4c,5h,8s,8d,8h 2s,3d,8c,4h,4c,Jd,Jh first set beats two pair
2s,3d,8c,4h,Qc,Qd,Qh 2s,3d,4c,5h,Js,Jd,Jh first compare sets

Straight

rule for comparing seven card hands
first second winner? comment
Ks,Jd,4c,5h,6c,7d,8h 2s,3d,4c,5h,Js,Jd,Jh first straight beats set
Ks,Jd,4c,5h,6c,7d,8h 2s,3d,8c,4h,4c,Jd,Jh first straight beats two pair
Ks,Jd,4c,5h,6c,7d,8h 2s,3d,9c,5h,7s,8d,Jh first straight beats high card ** should this already pass? **
2s,3d,9c,10h,Js,Kd,Qh Ks,Jd,4c,5h,6c,7d,8h first high straight beats low straight ** should this already pass? **

Flush

rule for comparing seven card hands
first second winner? comment

Full house

rule for comparing seven card hands
first second winner? comment

Four of a kind

rule for comparing seven card hands
first second winner? comment

Straight flush (includes Royal flush)

rule for comparing seven card hands
first second winner? comment

DEMONSTRATION LICENSE - This Confluence site is for demonstration purposes only. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.4.3 Build:#705 Mar 21, 2007) - Bug/feature request - Contact Administrators