Peter Billen <[EMAIL PROTECTED]> writes: > Hello all, > > How can you iterate over the cards in a StdDeck_CardMask? Say you have a > StdDeck_CardMask for "Ah Kh 8d 4d 9c", how can I get the first card (Ah), the > second card (Kh), ... and the fifth card (9c)? > > Do I have to iterate over all the 52 available cards, and check for each card > if > it is set in the mask (StdDeck_CardMask_CARD_IS_SET)? > > Thanks in advance. Kind regards,
You will find inspiration by reading the code of the pokenum.c A more elaborate solution is included in the pypoker-eval module You can meet me and others at irc.freenode.net#pokersource if you'd like to talk. Cheers, -- +33 1 76 60 72 81 Loic Dachary mailto:[EMAIL PROTECTED] http://dachary.org/loic/gpg.txt sip:[EMAIL PROTECTED] Latitude: 48.86962325498033 Longitude: 2.3623046278953552 _______________________________________________ Pokersource-users mailing list [email protected] https://mail.gna.org/listinfo/pokersource-users
