This began as a simple example of aggregation (deck -> 52 cards). I soon got bored an decided to do a fast, adaptable poker hand evaluation engine. This is in no way finished though, so if you feel like contribuing... feel free to do so The actual evaluation happens in the "Hand"-class. It retuns a hex-string like 2eea94. This means that you have a pair (first digit) and your five best cards are ace, ace, 10, 9, 4. The representation is hexadecimal because the card values range from 2-14, 14 beeing an ace (represented as an "e"). the first digit in the return string shows if you have a pair/flush/straight etc... (1 = high card to 9 = straight flush) The whole thing is very adaptable, as you could theoreticaly hold up to 52 cards in one hand, and not just 7 as in a regular texas-hold'em. It doesn't work for omaha (yet), or any other variant with low-hands... |
|||




