Ejemplo n.º 1
0
        public Dice()
        {
            _maxValue = 6;
            if (diceStatistics == null)
            {
                diceStatistics = new DiceStatistics(6);
            }

            if (diceStatistics.ListLength < 6)
            {
                diceStatistics.ExtendList(6 - diceStatistics.ListLength);
            }
        }
Ejemplo n.º 2
0
        public Dice(int diceMaxValue)
        {
            if (diceMaxValue >= 4)
            {
                _maxValue = diceMaxValue;
            }
            else
            {
                throw new Exception("Dice Max Value too short!");
            }

            if (diceStatistics == null)
            {
                diceStatistics = new DiceStatistics(diceMaxValue);
            }

            if (diceStatistics.ListLength < diceMaxValue)
            {
                diceStatistics.ExtendList(diceMaxValue - diceStatistics.ListLength);
            }
        }