title: Deciding who has won a hand of Poker in Java
body: <p>What would be the best way to compare two (and only two) players hands in Java using the best combination for 5 cards out of 7 cards (texas hold'em)?</p>
  
  <p>If each card is assigned a value or enum then is there an alogirthm that can be used to decide who has the strongest hand? </p>
  
  <p>I imagine you could either do an integer comparison to see who has the highest value hand or use some form of lookup table.</p>
  
  <p>Having a look around there is a hand evaluator called SpecialKPokerEval: <a href="http://code.google.com/p/specialkpokereval/" rel="nofollow">http://code.google.com/p/specialkpokereval/</a></p>
  
  <p>Would this be suitable and painless to implement into an existing project or should I look at doing something from scratch?</p>
  
  <p>EDIT:</p>
  
  <p>How do the hand evaluators that use integer values work?</p>
  
  <p>How does a lookup table work - does each possible hand have a value assigned to it?</p>