Example #1
0
        /// <summary>
        /// Handles the functionality for a dice roll.
        /// Deals with assigning random values 1-6 &
        /// adding the roll if it doesn't have a 1.
        /// </summary>
        /// <returns>The roll that was created.</returns>
        public PigRoll RollDice()
        {
            var currentRoll = new PigRoll();

            currentRoll.RandomlyAssignDice();

            if (!currentRoll.HasAOne)
            {
                this.Rolls.Add(currentRoll);
            }

            return(currentRoll);
        }
Example #2
0
 private void setCurrentDice(PigRoll currentRoll)
 {
     this.CurrentDiceOne = currentRoll.DiceOne;
     this.CurrentDiceTwo = currentRoll.DiceTwo;
 }