Last active
December 10, 2015 09:18
-
-
Save spetroll/4413201 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static long encode(IEnumerable<int> cards) | |
{ | |
long result = 0; | |
foreach(int c in cards) | |
{ | |
result |= encode(new Card(c)); | |
} | |
return result; | |
} | |
public static long encode(Card c) | |
{ | |
return 0x1L << ((int) c.Suit*16 + (int) c.Rank); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment