james wiley

james wiley

  • NA
  • 1
  • 0

C# Dice Game

May 4 2009 4:17 PM
Hey all I've got this dice game that i'm trying to make. It basically a dice version of golf. Each player rolls 3 dice until they roll a double. Each roll before the double is achieved counts as a stroke. Once a double is rolled i want the score for that hole to be displayed on the console. At the moment im still working with notepad and the basic SDK command prompt as this is all i understand. I've attempted some of the code so far but would really appreciate some help finishing it off (in simple terms if possible) Thanks in advance! CODE using System; namespace dicegame1 { public static void Main() { Random ran = new Random(); int player1 = 0; int player2 = 0; int player1RoundScore = 0; int player2RoundScore = 0; bool player1RoundScore = false; bool player2RoundScore = false; int roundNumber = 1; // Random dice rolling // { int diceOne = ran.Next(1,7); int diceTwo = ran.Next(1,7); int diceThree = ran.Next(1,7); } { if (diceOne == diceTwo || diceTwo == diceThree || diceOne == diceThree) } } }

Answers (1)