package Ġcom . tak use mb a . ek u ity Ċ Ċ import Ġcom . google . common . truth . Truth . assertThat Ċ import Ġcom . tak use mb a . ek u ity . Hand . Flush Ċ import Ġcom . tak use mb a . ek u ity . Hand . Full House Ċ import Ġcom . tak use mb a . ek u ity . Hand . High Card Ċ import Ġcom . tak use mb a . ek u ity . Hand . One Pair Ċ import Ġcom . tak use mb a . ek u ity . Hand . Qu ads Ċ import Ġcom . tak use mb a . ek u ity . Hand . Str aight Ċ import Ġcom . tak use mb a . ek u ity . Hand . Str aight Flush Ċ import Ġcom . tak use mb a . ek u ity . Hand . Tri ps Ċ import Ġcom . tak use mb a . ek u ity . Hand . Two Pair Ċ import Ġcom . tak use mb a . ek u ity . Rank . ACE Ċ import Ġcom . tak use mb a . ek u ity . Rank . E IGHT Ċ import Ġcom . tak use mb a . ek u ity . Rank . FI VE Ċ import Ġcom . tak use mb a . ek u ity . Rank . FO UR Ċ import Ġcom . tak use mb a . ek u ity . Rank . J ACK Ċ import Ġcom . tak use mb a . ek u ity . Rank . K ING Ċ import Ġcom . tak use mb a . ek u ity . Rank . N INE Ċ import Ġcom . tak use mb a . ek u ity . Rank . QUE EN Ċ import Ġcom . tak use mb a . ek u ity . Rank . SE VEN Ċ import Ġcom . tak use mb a . ek u ity . Rank . SIX Ċ import Ġcom . tak use mb a . ek u ity . Rank . TEN Ċ import Ġcom . tak use mb a . ek u ity . Rank . TH REE Ċ import Ġcom . tak use mb a . ek u ity . Rank . TWO Ċ import Ġcom . tak use mb a . ek u ity . Suit . CL UB Ċ import Ġcom . tak use mb a . ek u ity . Suit . DI AM OND Ċ import Ġcom . tak use mb a . ek u ity . Suit . HE ART Ċ import Ġcom . tak use mb a . ek u ity . Suit . SP ADE Ċ import Ġcom . tak use mb a . ek u ity . util . Quadr uple Ċ import Ġcom . tak use mb a . ek u ity . util . Qu int uple Ċ import Ġorg . junit . Test Ċ Ċ class ĠHand Test Ġ{ ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġcompare H ands () Ġ{ ĊĠĠĠ Ġval Ġhigh Card Ġ= ĠHigh Card ( ĊĠĠĠĠĠ Ġfirst K icker Ġ= ĠCard ( ACE , ĠCL UB ), ĊĠĠĠĠĠ Ġsecond K icker Ġ= ĠCard ( K ING , ĠDI AM OND ), ĊĠĠĠĠĠ Ġthird K icker Ġ= ĠCard ( QUE EN , ĠHE ART ), ĊĠĠĠĠĠ Ġforth K icker Ġ= ĠCard ( J ACK , ĠDI AM OND ), ĊĠĠĠĠĠ Ġf ifth K icker Ġ= ĠCard ( SE VEN , ĠDI AM OND ) ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġone Pair Ġ= ĠOne Pair ( ĊĠĠĠĠĠ Ġpair Ġ= ĠPair ( Card ( FO UR , ĠCL UB ), ĠCard ( FO UR , ĠHE ART )), ĊĠĠĠĠĠ Ġfirst K icker Ġ= ĠCard ( QUE EN , ĠDI AM OND ), ĊĠĠĠĠĠ Ġsecond K icker Ġ= ĠCard ( TEN , ĠCL UB ), ĊĠĠĠĠĠ Ġthird K icker Ġ= ĠCard ( E IGHT , ĠCL UB ) ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġtwo Pair Ġ= ĠTwo Pair ( ĊĠĠĠĠĠ Ġfirst Pair Ġ= ĠPair ( Card ( FI VE , ĠHE ART ), ĠCard ( FI VE , ĠSP ADE )), ĊĠĠĠĠĠ Ġsecond Pair Ġ= ĠPair ( Card ( TWO , ĠSP ADE ), ĠCard ( TWO , ĠHE ART )), ĊĠĠĠĠĠ Ġk icker Ġ= ĠCard ( QUE EN , ĠDI AM OND ) ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġtri ps Ġ= ĠTri ps ( ĊĠĠĠĠĠ Ġtriple Ġ= ĠTrip le ( ĊĠĠĠĠĠĠĠ ĠCard ( FO UR , ĠSP ADE ), ĊĠĠĠĠĠĠĠ ĠCard ( FO UR , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( FO UR , ĠHE ART ) ĊĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġfirst K icker Ġ= ĠCard ( ACE , ĠCL UB ), ĊĠĠĠĠĠ Ġsecond K icker Ġ= ĠCard ( K ING , ĠSP ADE ) ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġstraight Ġ= ĠS tra ight ( ĊĠĠĠĠĠ Ġqu int uple Ġ= ĠQu int uple ( ĊĠĠĠĠĠĠĠ ĠCard ( SIX , ĠSP ADE ), ĊĠĠĠĠĠĠĠ ĠCard ( FI VE , ĠHE ART ), ĊĠĠĠĠĠĠĠ ĠCard ( FO UR , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( TH REE , ĠHE ART ), ĊĠĠĠĠĠĠĠ ĠCard ( TWO , ĠHE ART ) ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġflush Ġ= ĠFlush ( ĊĠĠĠĠĠ Ġqu int uple Ġ= ĠQu int uple ( ĊĠĠĠĠĠĠĠ ĠCard ( ACE , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( QUE EN , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( J ACK , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( SIX , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( TH REE , ĠCL UB ) ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġfull House Ġ= ĠFull House ( ĊĠĠĠĠĠ Ġtriple Ġ= ĠTrip le ( ĊĠĠĠĠĠĠĠ ĠCard ( TH REE , ĠDI AM OND ), ĊĠĠĠĠĠĠĠ ĠCard ( TH REE , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( TH REE , ĠSP ADE ) ĊĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġpair Ġ= ĠPair ( Card ( N INE , ĠCL UB ), ĠCard ( N INE , ĠHE ART )) ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġqu ads Ġ= ĠQu ads ( ĊĠĠĠĠĠ Ġquadr uple Ġ= ĠQu adr uple ( ĊĠĠĠĠĠĠĠ ĠCard ( rank Ġ= ĠK ING , Ġsuit Ġ= ĠHE ART ), ĊĠĠĠĠĠĠĠ ĠCard ( rank Ġ= ĠK ING , Ġsuit Ġ= ĠDI AM OND ), ĊĠĠĠĠĠĠĠ ĠCard ( rank Ġ= ĠK ING , Ġsuit Ġ= ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( rank Ġ= ĠK ING , Ġsuit Ġ= ĠSP ADE ) ĊĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġk icker Ġ= ĠCard ( rank Ġ= ĠACE , Ġsuit Ġ= ĠDI AM OND ) ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġstraight Flush Ġ= ĠS tra ight Flush ( ĊĠĠĠĠĠ Ġqu int uple Ġ= ĠQu int uple ( ĊĠĠĠĠĠĠĠ ĠCard ( SE VEN , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( SIX , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( FI VE , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( FO UR , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( TH REE , ĠCL UB ) ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ) ĊĊĠĠĠ ĠassertThat < Hand >( high Card ). is LessThan ( one Pair ) ĊĠĠĠ ĠassertThat < Hand >( high Card ). is LessThan ( two Pair ) ĊĠĠĠ ĠassertThat < Hand >( high Card ). is LessThan ( tri ps ) ĊĠĠĠ ĠassertThat < Hand >( high Card ). is LessThan ( stra ight ) ĊĠĠĠ ĠassertThat < Hand >( high Card ). is LessThan ( flush ) ĊĠĠĠ ĠassertThat < Hand >( high Card ). is LessThan ( full House ) ĊĠĠĠ ĠassertThat < Hand >( high Card ). is LessThan ( qu ads ) ĊĠĠĠ ĠassertThat < Hand >( high Card ). is LessThan ( stra ight Flush ) ĊĊĠĠĠ ĠassertThat < Hand >( one Pair ). is GreaterThan ( high Card ) ĊĠĠĠ ĠassertThat < Hand >( one Pair ). is LessThan ( two Pair ) ĊĠĠĠ ĠassertThat < Hand >( one Pair ). is LessThan ( tri ps ) ĊĠĠĠ ĠassertThat < Hand >( one Pair ). is LessThan ( stra ight ) ĊĠĠĠ ĠassertThat < Hand >( one Pair ). is LessThan ( flush ) ĊĠĠĠ ĠassertThat < Hand >( one Pair ). is LessThan ( full House ) ĊĠĠĠ ĠassertThat < Hand >( one Pair ). is LessThan ( qu ads ) ĊĠĠĠ ĠassertThat < Hand >( one Pair ). is LessThan ( stra ight Flush ) ĊĊĠĠĠ ĠassertThat < Hand >( two Pair ). is GreaterThan ( high Card ) ĊĠĠĠ ĠassertThat < Hand >( two Pair ). is GreaterThan ( one Pair ) ĊĠĠĠ ĠassertThat < Hand >( two Pair ). is LessThan ( tri ps ) ĊĠĠĠ ĠassertThat < Hand >( two Pair ). is LessThan ( stra ight ) ĊĠĠĠ ĠassertThat < Hand >( two Pair ). is LessThan ( flush ) ĊĠĠĠ ĠassertThat < Hand >( two Pair ). is LessThan ( full House ) ĊĠĠĠ ĠassertThat < Hand >( two Pair ). is LessThan ( qu ads ) ĊĠĠĠ ĠassertThat < Hand >( two Pair ). is LessThan ( stra ight Flush ) ĊĊĠĠĠ ĠassertThat < Hand >( tri ps ). is GreaterThan ( high Card ) ĊĠĠĠ ĠassertThat < Hand >( tri ps ). is GreaterThan ( one Pair ) ĊĠĠĠ ĠassertThat < Hand >( tri ps ). is GreaterThan ( two Pair ) ĊĠĠĠ ĠassertThat < Hand >( tri ps ). is LessThan ( stra ight ) ĊĠĠĠ ĠassertThat < Hand >( tri ps ). is LessThan ( flush ) ĊĠĠĠ ĠassertThat < Hand >( tri ps ). is LessThan ( full House ) ĊĠĠĠ ĠassertThat < Hand >( tri ps ). is LessThan ( qu ads ) ĊĠĠĠ ĠassertThat < Hand >( tri ps ). is LessThan ( stra ight Flush ) ĊĊĠĠĠ ĠassertThat < Hand >( stra ight ). is GreaterThan ( high Card ) ĊĠĠĠ ĠassertThat < Hand >( stra ight ). is GreaterThan ( one Pair ) ĊĠĠĠ ĠassertThat < Hand >( stra ight ). is GreaterThan ( two Pair ) ĊĠĠĠ ĠassertThat < Hand >( stra ight ). is GreaterThan ( tri ps ) ĊĠĠĠ ĠassertThat < Hand >( stra ight ). is LessThan ( flush ) ĊĠĠĠ ĠassertThat < Hand >( stra ight ). is LessThan ( full House ) ĊĠĠĠ ĠassertThat < Hand >( stra ight ). is LessThan ( qu ads ) ĊĠĠĠ ĠassertThat < Hand >( stra ight ). is LessThan ( stra ight Flush ) ĊĊĠĠĠ ĠassertThat < Hand >( flush ). is GreaterThan ( high Card ) ĊĠĠĠ ĠassertThat < Hand >( flush ). is GreaterThan ( one Pair ) ĊĠĠĠ ĠassertThat < Hand >( flush ). is GreaterThan ( two Pair ) ĊĠĠĠ ĠassertThat < Hand >( flush ). is GreaterThan ( tri ps ) ĊĠĠĠ ĠassertThat < Hand >( flush ). is GreaterThan ( stra ight ) ĊĠĠĠ ĠassertThat < Hand >( flush ). is LessThan ( full House ) ĊĠĠĠ ĠassertThat < Hand >( flush ). is LessThan ( qu ads ) ĊĠĠĠ ĠassertThat < Hand >( flush ). is LessThan ( stra ight Flush ) ĊĊĠĠĠ ĠassertThat < Hand >( full House ). is GreaterThan ( high Card ) ĊĠĠĠ ĠassertThat < Hand >( full House ). is GreaterThan ( one Pair ) ĊĠĠĠ ĠassertThat < Hand >( full House ). is GreaterThan ( two Pair ) ĊĠĠĠ ĠassertThat < Hand >( full House ). is GreaterThan ( tri ps ) ĊĠĠĠ ĠassertThat < Hand >( full House ). is GreaterThan ( stra ight ) ĊĠĠĠ ĠassertThat < Hand >( full House ). is GreaterThan ( flush ) ĊĠĠĠ ĠassertThat < Hand >( full House ). is LessThan ( qu ads ) ĊĠĠĠ ĠassertThat < Hand >( full House ). is LessThan ( stra ight Flush ) ĊĊĠĠĠ ĠassertThat < Hand >( qu ads ). is GreaterThan ( high Card ) ĊĠĠĠ ĠassertThat < Hand >( qu ads ). is GreaterThan ( one Pair ) ĊĠĠĠ ĠassertThat < Hand >( qu ads ). is GreaterThan ( two Pair ) ĊĠĠĠ ĠassertThat < Hand >( qu ads ). is GreaterThan ( tri ps ) ĊĠĠĠ ĠassertThat < Hand >( qu ads ). is GreaterThan ( stra ight ) ĊĠĠĠ ĠassertThat < Hand >( qu ads ). is GreaterThan ( flush ) ĊĠĠĠ ĠassertThat < Hand >( qu ads ). is GreaterThan ( full House ) ĊĠĠĠ ĠassertThat < Hand >( qu ads ). is LessThan ( stra ight Flush ) ĊĊĠĠĠ ĠassertThat < Hand >( stra ight Flush ). is GreaterThan ( high Card ) ĊĠĠĠ ĠassertThat < Hand >( stra ight Flush ). is GreaterThan ( one Pair ) ĊĠĠĠ ĠassertThat < Hand >( stra ight Flush ). is GreaterThan ( two Pair ) ĊĠĠĠ ĠassertThat < Hand >( stra ight Flush ). is GreaterThan ( tri ps ) ĊĠĠĠ ĠassertThat < Hand >( stra ight Flush ). is GreaterThan ( stra ight ) ĊĠĠĠ ĠassertThat < Hand >( stra ight Flush ). is GreaterThan ( flush ) ĊĠĠĠ ĠassertThat < Hand >( stra ight Flush ). is GreaterThan ( full House ) ĊĠĠĠ ĠassertThat < Hand >( stra ight Flush ). is GreaterThan ( qu ads ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġcompare High Card () Ġ{ ĊĠĠĠ Ġval Ġleft Ġ= ĠHigh Card ( ĊĠĠĠĠĠ Ġfirst K icker Ġ= ĠCard ( ACE , ĠCL UB ), ĊĠĠĠĠĠ Ġsecond K icker Ġ= ĠCard ( K ING , ĠDI AM OND ), ĊĠĠĠĠĠ Ġthird K icker Ġ= ĠCard ( QUE EN , ĠHE ART ), ĊĠĠĠĠĠ Ġforth K icker Ġ= ĠCard ( J ACK , ĠDI AM OND ), ĊĠĠĠĠĠ Ġf ifth K icker Ġ= ĠCard ( SE VEN , ĠDI AM OND ) ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġright Ġ= ĠHigh Card ( ĊĠĠĠĠĠ Ġfirst K icker Ġ= ĠCard ( K ING , ĠCL UB ), ĊĠĠĠĠĠ Ġsecond K icker Ġ= ĠCard ( QUE EN , ĠDI AM OND ), ĊĠĠĠĠĠ Ġthird K icker Ġ= ĠCard ( J ACK , ĠHE ART ), ĊĠĠĠĠĠ Ġforth K icker Ġ= ĠCard ( SE VEN , ĠDI AM OND ), ĊĠĠĠĠĠ Ġf ifth K icker Ġ= ĠCard ( TWO , ĠDI AM OND ) ĊĠĠĠ Ġ) ĊĠĠĠ ĠassertThat ( left ). is GreaterThan ( right ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġcompare One Pair () Ġ{ ĊĠĠĠ Ġval Ġleft Ġ= ĠOne Pair ( ĊĠĠĠĠĠ Ġpair Ġ= ĠPair ( Card ( K ING , ĠCL UB ), ĠCard ( K ING , ĠHE ART )), ĊĠĠĠĠĠ Ġfirst K icker Ġ= ĠCard ( QUE EN , ĠDI AM OND ), ĊĠĠĠĠĠ Ġsecond K icker Ġ= ĠCard ( TEN , ĠCL UB ), ĊĠĠĠĠĠ Ġthird K icker Ġ= ĠCard ( E IGHT , ĠCL UB ) ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġright Ġ= ĠOne Pair ( ĊĠĠĠĠĠ Ġpair Ġ= ĠPair ( Card ( FO UR , ĠCL UB ), ĠCard ( FO UR , ĠHE ART )), ĊĠĠĠĠĠ Ġfirst K icker Ġ= ĠCard ( QUE EN , ĠDI AM OND ), ĊĠĠĠĠĠ Ġsecond K icker Ġ= ĠCard ( TEN , ĠCL UB ), ĊĠĠĠĠĠ Ġthird K icker Ġ= ĠCard ( E IGHT , ĠCL UB ) ĊĠĠĠ Ġ) ĊĠĠĠ ĠassertThat ( left ). is GreaterThan ( right ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġcompare Two Pair () Ġ{ ĊĠĠĠ Ġval Ġleft Ġ= ĠTwo Pair ( ĊĠĠĠĠĠ Ġfirst Pair Ġ= ĠPair ( Card ( SIX , ĠHE ART ), ĠCard ( SIX , ĠSP ADE )), ĊĠĠĠĠĠ Ġsecond Pair Ġ= ĠPair ( Card ( TWO , ĠSP ADE ), ĠCard ( TWO , ĠHE ART )), ĊĠĠĠĠĠ Ġk icker Ġ= ĠCard ( QUE EN , ĠDI AM OND ) ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġright Ġ= ĠTwo Pair ( ĊĠĠĠĠĠ Ġfirst Pair Ġ= ĠPair ( Card ( FI VE , ĠHE ART ), ĠCard ( FI VE , ĠSP ADE )), ĊĠĠĠĠĠ Ġsecond Pair Ġ= ĠPair ( Card ( TWO , ĠSP ADE ), ĠCard ( TWO , ĠHE ART )), ĊĠĠĠĠĠ Ġk icker Ġ= ĠCard ( QUE EN , ĠDI AM OND ) ĊĠĠĠ Ġ) ĊĠĠĠ ĠassertThat ( left ). is GreaterThan ( right ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġcompare Tri ps () Ġ{ ĊĠĠĠ Ġval Ġleft Ġ= ĠTri ps ( ĊĠĠĠĠĠ Ġtriple Ġ= ĠTrip le ( ĊĠĠĠĠĠĠĠ ĠCard ( TEN , ĠSP ADE ), ĊĠĠĠĠĠĠĠ ĠCard ( TEN , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( TEN , ĠHE ART ) ĊĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġfirst K icker Ġ= ĠCard ( ACE , ĠCL UB ), ĊĠĠĠĠĠ Ġsecond K icker Ġ= ĠCard ( K ING , ĠSP ADE ) ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġright Ġ= ĠTri ps ( ĊĠĠĠĠĠ Ġtriple Ġ= ĠTrip le ( ĊĠĠĠĠĠĠĠ ĠCard ( FO UR , ĠSP ADE ), ĊĠĠĠĠĠĠĠ ĠCard ( FO UR , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( FO UR , ĠHE ART ) ĊĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġfirst K icker Ġ= ĠCard ( ACE , ĠCL UB ), ĊĠĠĠĠĠ Ġsecond K icker Ġ= ĠCard ( K ING , ĠSP ADE ) ĊĠĠĠ Ġ) ĊĠĠĠ ĠassertThat ( left ). is GreaterThan ( right ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġcompare Str aight () Ġ{ ĊĠĠĠ Ġval Ġleft Ġ= ĠS tra ight ( ĊĠĠĠĠĠ Ġqu int uple Ġ= ĠQu int uple ( ĊĠĠĠĠĠĠĠ ĠCard ( SE VEN , ĠHE ART ), ĊĠĠĠĠĠĠĠ ĠCard ( SIX , ĠSP ADE ), ĊĠĠĠĠĠĠĠ ĠCard ( FI VE , ĠHE ART ), ĊĠĠĠĠĠĠĠ ĠCard ( FO UR , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( TH REE , ĠHE ART ) ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġright Ġ= ĠS tra ight ( ĊĠĠĠĠĠ Ġqu int uple Ġ= ĠQu int uple ( ĊĠĠĠĠĠĠĠ ĠCard ( SIX , ĠSP ADE ), ĊĠĠĠĠĠĠĠ ĠCard ( FI VE , ĠHE ART ), ĊĠĠĠĠĠĠĠ ĠCard ( FO UR , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( TH REE , ĠHE ART ), ĊĠĠĠĠĠĠĠ ĠCard ( TWO , ĠHE ART ) ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ) ĊĠĠĠ ĠassertThat ( left ). is GreaterThan ( right ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġcompare Flush () Ġ{ ĊĠĠĠ Ġval Ġleft Ġ= ĠFlush ( ĊĠĠĠĠĠ Ġqu int uple Ġ= ĠQu int uple ( ĊĠĠĠĠĠĠĠ ĠCard ( ACE , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( QUE EN , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( J ACK , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( SIX , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( TH REE , ĠCL UB ) ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġright Ġ= ĠFlush ( ĊĠĠĠĠĠ Ġqu int uple Ġ= ĠQu int uple ( ĊĠĠĠĠĠĠĠ ĠCard ( QUE EN , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( J ACK , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( SIX , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( FI VE , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( TH REE , ĠCL UB ) ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ) ĊĠĠĠ ĠassertThat ( left ). is GreaterThan ( right ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġcompare Full House () Ġ{ ĊĠĠĠ Ġval Ġleft Ġ= ĠFull House ( ĊĠĠĠĠĠ Ġtriple Ġ= ĠTrip le ( ĊĠĠĠĠĠĠĠ ĠCard ( TEN , ĠDI AM OND ), ĊĠĠĠĠĠĠĠ ĠCard ( TEN , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( TEN , ĠSP ADE ) ĊĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġpair Ġ= ĠPair ( Card ( N INE , ĠCL UB ), ĠCard ( N INE , ĠHE ART )) ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġright Ġ= ĠFull House ( ĊĠĠĠĠĠ Ġtriple Ġ= ĠTrip le ( ĊĠĠĠĠĠĠĠ ĠCard ( TH REE , ĠDI AM OND ), ĊĠĠĠĠĠĠĠ ĠCard ( TH REE , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( TH REE , ĠSP ADE ) ĊĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġpair Ġ= ĠPair ( Card ( N INE , ĠCL UB ), ĠCard ( N INE , ĠHE ART )) ĊĠĠĠ Ġ) ĊĠĠĠ ĠassertThat ( left ). is GreaterThan ( right ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġcompare Qu ads () Ġ{ ĊĠĠĠ Ġval Ġleft Ġ= ĠQu ads ( ĊĠĠĠĠĠ Ġquadr uple Ġ= ĠQu adr uple ( ĊĠĠĠĠĠĠĠ ĠCard ( rank Ġ= ĠK ING , Ġsuit Ġ= ĠHE ART ), ĊĠĠĠĠĠĠĠ ĠCard ( rank Ġ= ĠK ING , Ġsuit Ġ= ĠDI AM OND ), ĊĠĠĠĠĠĠĠ ĠCard ( rank Ġ= ĠK ING , Ġsuit Ġ= ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( rank Ġ= ĠK ING , Ġsuit Ġ= ĠSP ADE ) ĊĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġk icker Ġ= ĠCard ( rank Ġ= ĠACE , Ġsuit Ġ= ĠDI AM OND ) ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġright Ġ= ĠQu ads ( ĊĠĠĠĠĠ Ġquadr uple Ġ= ĠQu adr uple ( ĊĠĠĠĠĠĠĠ ĠCard ( rank Ġ= ĠJ ACK , Ġsuit Ġ= ĠHE ART ), ĊĠĠĠĠĠĠĠ ĠCard ( rank Ġ= ĠJ ACK , Ġsuit Ġ= ĠDI AM OND ), ĊĠĠĠĠĠĠĠ ĠCard ( rank Ġ= ĠJ ACK , Ġsuit Ġ= ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( rank Ġ= ĠJ ACK , Ġsuit Ġ= ĠSP ADE ) ĊĠĠĠĠĠ Ġ), ĊĠĠĠĠĠ Ġk icker Ġ= ĠCard ( rank Ġ= ĠACE , Ġsuit Ġ= ĠDI AM OND ) ĊĠĠĠ Ġ) ĊĠĠĠ ĠassertThat ( left ). is GreaterThan ( right ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġcompare Str aight Flush () Ġ{ ĊĠĠĠ Ġval Ġleft Ġ= ĠS tra ight Flush ( ĊĠĠĠĠĠ Ġqu int uple Ġ= ĠQu int uple ( ĊĠĠĠĠĠĠĠ ĠCard ( E IGHT , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( SE VEN , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( SIX , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( FI VE , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( FO UR , ĠCL UB ) ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġright Ġ= ĠS tra ight Flush ( ĊĠĠĠĠĠ Ġqu int uple Ġ= ĠQu int uple ( ĊĠĠĠĠĠĠĠ ĠCard ( SE VEN , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( SIX , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( FI VE , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( FO UR , ĠCL UB ), ĊĠĠĠĠĠĠĠ ĠCard ( TH REE , ĠCL UB ) ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ) ĊĠĠĠ ĠassertThat ( left ). is GreaterThan ( right ) ĊĠ Ġ} Ċ }