public static int TimesXOfKind(this IHand hand, int x) { return hand.CardsByFace().Where(g => g.Count() == x).Count(); }
public static bool HasXOfKind(this IHand hand, int x) { return hand.CardsByFace().Any(g => g.Count() == x); }
public static bool IsFaceRepeated(this IHand hand, int times) { return hand.CardsByFace().Any(g => g.Count() == times); }
public static IEnumerable<IGrouping<CardFace, ICard>> GetXOfKind(this IHand hand, int x) { return hand.CardsByFace().Where(g => g.Count() == x); }