public void MyCode()
        {
            // The FIRST line of code should be BELOW this line

            Die die = new Die();

            die.RollDie();
            int dieRoll = die.GetValue();

            Console.WriteLine(dieRoll);

            Console.WriteLine(".....................");

            DiceCup diceCup = new DiceCup();

            diceCup.RollDice();
            totalValue = diceCup.getTotalValue();

            generator = new Random();
            Thread.Sleep(10);

            _randomNum = generator.Next(12) + 1;

            isLarger = diceCup.isTotalValueLargerThan(_randomNum);

            Console.WriteLine("The dices rolled: {0}", totalValue);
            Console.WriteLine("Is the value larger than {0}: {1}",_randomNum, isLarger);

            // The LAST line of code should be ABOVE this line
        }
        public void MyCode()
        {
            // The FIRST line of code should be BELOW this line

            // Creates die object
            Die die1 = new Die();

            die1.RollDie();
            Console.WriteLine(die1.GetValue());

            // The LAST line of code should be ABOVE this line
        }
        public void MyCode()
        {
            // The FIRST line of code should be BELOW this line

            // Creates die object
            Die die1 = new Die();


            die1.RollDie();
            Console.WriteLine(die1.GetValue());



            // The LAST line of code should be ABOVE this line
        }
Example #4
0
 // You must create a method with the below header:
 /// <summary>
 /// Returns the value of the three dice
 /// </summary>
 /// <returns></returns>
 public int GetTotalValue()
 {
     return(die1red.GetValue() + die2.GetValue() + die3.GetValue());
 }