Example #1
0
        public void ConfigureRules(PokerRules rules)
        {
            _pokerRulesService.Configure(rules);
            _deck = Enum.GetValues(typeof(SuitType)).Cast<SuitType>().SelectMany(x => Enum.GetValues(typeof(NumberType)).Cast<NumberType>().Select(c => new PokerCard(x, c))).ToList();

            // Mix of the Deck. If comment this line gamers will be able to get high PokerHands (StraightFlush, Four of a kind and etc.)
            _deck = _deck.OrderBy(x => Guid.NewGuid()).ToList();
        }
Example #2
0
 public void Configure(PokerRules rules)
 {
     _rolesPokerTable = rules;
     DefineRulesForPockerHands();
 }