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 DiceCup myDie = new DiceCup(); System.Console.WriteLine($"Du har slået: {myDie.TotalValue}"); // The LAST line of code should be ABOVE this line }
public void MyCode() { // The FIRST line of code should be BELOW this line DiceCup myDiceCup = new DiceCup(); Console.WriteLine($"In the DiceCup we rolled for a total of {myDiceCup.TotalValue}"); Console.WriteLine("Let us shake things up."); myDiceCup.Shake(); Console.WriteLine($"Now we rolled for a total of {myDiceCup.TotalValue}"); Console.WriteLine("One more time"); myDiceCup.Shake(); Console.WriteLine($"Now we rolled for a total of {myDiceCup.TotalValue}"); // The LAST line of code should be ABOVE this line }
public void MyCode() { // The FIRST line of code should be BELOW this line DiceCup cup = new DiceCup(); Console.WriteLine($"Total value is {cup.TotalValue}"); cup.Shake(); Console.WriteLine($"Total value is {cup.TotalValue}"); DieNSides d100 = new DieNSides(100); d100.Roll(); Console.WriteLine($"100-sided die shows {d100.Value}"); // The LAST line of code should be ABOVE this line }
public void MyCode() { // The FIRST line of code should be BELOW this line // New die //Die die1 = new Die(); //die1.RollDie(); //Console.WriteLine("The value of the dice is {0}", die1.GetValue()); //die1.RollDie(); //Console.WriteLine("The value of the dice is {0}", die1.GetValue()); DiceCup diceCup = new DiceCup(); diceCup.RollAllDiceInCup(); Console.WriteLine("Value of dicecup is {0}", diceCup.GetTotalValue()); int value1 = 10; bool resultat = diceCup.IsTotalValueLargerThan(value1); Console.WriteLine("Is the total value of the dice larger than {0} the result is: {1}", value1, resultat); // The LAST line of code should be ABOVE this line }