Exemplo n.º 1
0
        public GameManager(int numberOfDice, int noOfFaces)
        {
            _cup            = new DiceCup(numberOfDice, noOfFaces);
            _diceEvaluators = new Dictionary <string, IDiceEvaluator>();

            _diceEvaluators.Add("Ones", new OnesEvaluator());
            _diceEvaluators.Add("Twos", new TwosEvaluator());
            _diceEvaluators.Add("Threes", new ThreesEvaluator());
            _diceEvaluators.Add("Fours", new FoursEvaluator());
            _diceEvaluators.Add("Fives", new FivesEvaluator());
            _diceEvaluators.Add("Sixes", new SixesEvaluator());

            _diceEvaluators.Add("One Pair", new OnePairEvaluator());
            _diceEvaluators.Add("Two Pairs", new TwoPairsEvaluator());
            _diceEvaluators.Add("Three Pairs", new ThreePairsEvaluator());

            _diceEvaluators.Add("Three of a Kind", new ThreeOfAKindEvaluator());
            _diceEvaluators.Add("Four of a Kind", new FourOfAKindEvaluator());
            _diceEvaluators.Add("Five of a Kind", new FiveOfAKindEvaluator());

            _diceEvaluators.Add("Small Straight", new SmallStraightEvaluator());
            _diceEvaluators.Add("Big Straight", new BigStraightEvaluator());
            _diceEvaluators.Add("Full Straight", new FullStraightEvaluator());

            _diceEvaluators.Add("Full House", new FullHouseEvaluator());
            _diceEvaluators.Add("Double House", new DoubleHouseEvaluator());
            _diceEvaluators.Add("Tower", new TowerEvaluator());

            _diceEvaluators.Add("Chance", new ChanceEvaluator());
            _diceEvaluators.Add("Yatzy", new YatzyEvaluator());

            _evaluationStats = new DiceEvaluationStatistics();
        }
Exemplo n.º 2
0
        public GameManager(int numberOfDice, int noOfFaces)
        {
            _cup = new DiceCup(numberOfDice, noOfFaces);

            _diceEvaluators = new Dictionary <string, IDiceEvaluator>();
            _diceEvaluators.Add("Chance", new ChanceEvaluator());
            _diceEvaluators.Add("One Pair", new OnePairEvaluator());
        }
Exemplo n.º 3
0
        public GameManager(int numberOfDice, int noOfFaces)
        {
            _cup          = new DiceCup(numberOfDice, noOfFaces);
            _numberOfDice = numberOfDice;
            _noOfFaces    = noOfFaces;

            _diceEvaluators = new Dictionary <string, IDiceEvaluator>();
            _diceEvaluators.Add("Chance", new ChanceEvaluator());
            _diceEvaluators.Add("One Pair", new OnePairEvaluator());
            _diceEvaluators.Add("Two Pair", new TwoPairEvaluator());
            _diceEvaluators.Add("Three pair", new ThreePairEvaluator());
            _diceEvaluators.Add("Three of a kind", new ThreeOfAKind());
            _diceEvaluators.Add("Yatzy", new YatzyEvaluation());
        }