title: Two plus Two Poker hand evaluator: How are the cards mapped to the integers?
body: <p>In an effort to create the fastest possible monte carlo texas hold'em hand analyzer with C++, I am currently looking into the subject of hand evaluation.</p>
  
  <p>As many of you may know, there are quite a number of hand evaluators, open source, out there. After giving it some thought, I settled on the "Two Plus Two hand evaluator" (so named since it was first introduced on the two plus two forum).</p>
  
  <p>This is one of the fastest known evaluators out there, and uses array lookups to quickly find the value of a hand.</p>
  
  <p>Now, for the function, you need to pass in an array with the cards you are interested in. Example:</p>
  
  <pre><code>int Cards[] = { 3, 5, 10, 17, 23, 24, 32 };
  int hv = HandValue(Cards);
  </code></pre>
  
  <p>With values between 1 and 52. Now, my question is: What cards do these integers correspond to? Is a 3 an ace of spades? A three of hearts? I have scoured google, the two + two forum, various pages where hand evaluators are presented, the source file for the build-up of the array. All in vain. So I am hoping that someone here can point me in the right direction of where I can find this information, or give it to me outright.</p>
  
  <p>The source where the evaluators are taken from is this excellent article: <a href="http://www.codingthewheel.com/archives/poker-hand-evaluator-roundup#cactus_kev" rel="nofollow">http://www.codingthewheel.com/archives/poker-hand-evaluator-roundup#cactus_kev</a>
  Which explains all the evaluators individually.</p>