Beispiel #1
0
 public static int GetScore(IReadOnlyList <Card> hand)
 {
     VerifyArg.NoneNull(hand, nameof(hand));
     VerifyArg.Count(hand, nameof(hand), 5);
     return(Table[hand[0].Index][hand[1].Index][hand[2].Index][hand[3].Index]
            [hand[4].Index]);
 }
Beispiel #2
0
        public Table(IEnumerable <Pocket> pockets, IEnumerable <Card> community)
        {
            VerifyArg.NoneNull(pockets, nameof(pockets));
            VerifyArg.Nonempty(pockets, nameof(pockets));
            Pockets = pockets.ToList().AsReadOnly();

            VerifyArg.NoneNull(community, nameof(community));
            VerifyArg.True(community.Count() <= 5,
                           nameof(community), "Collection must not contain more than 5 items.");
            Community = community.ToList().AsReadOnly();
        }