Пример #1
0
        private Coordinate RandomCoordinates(RoomBlocks blocks)
        {
            Coordinate point;

            do
            {
                point = new Coordinate(
                    _randomNumberGenerator.Dice(blocks.RowUpperBound),
                    _randomNumberGenerator.Dice(blocks.ColumnUpperBound)
                    );
            } while (!blocks.IsInside(point));

            return(point);
        }
Пример #2
0
        internal int RollDice()
        {
            var sum = 0;

            for (var i = 0; i < NumRolls; i++)
            {
                sum += _randomNumbers.Dice(MaxPoints);
            }

            return(sum);
        }