Exemplo n.º 1
0
        /// <summary>
        /// Roll the dice
        /// </summary>
        /// <param name="rcr"></param>
        /// <returns></returns>
        internal int Roll(RngCryptoRandom rcr)
        {
            //ResultRoll = Enumerable.Range(1, _amount).Sum(c => rcr.Next(1, _size + 1));

            DiceRollResult = Enumerable.Range(1, _amount).Select(c => rcr.Next(1, _size + 1)).ToArray();

            return(ResultRoll + _modifier);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Roll the dice
        /// </summary>
        /// <param name="rcr"></param>
        /// <returns></returns>
        internal string Roll(RngCryptoRandom rcr)
        {
            Result = _sides[rcr.Next(0, _sides.Count)];

            return(Result);
        }