public static long UniqueHands(ulong shared, int ncards)
{
#if DEBUG
if (BitCount(shared) > ncards) throw new ArgumentException("mask must contain less cards than ncards");
#endif
uint hv = 0U;
Dictionary<uint, long> dict = new Dictionary<uint, long>();
foreach (ulong mask in Hand.Hands(shared, 0UL, ncards))
{
hv = Hand.Evaluate(mask);
if (!dict.ContainsKey(hv))
dict.Add(hv, 1);
}
return dict.Count;
}