TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
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) } } }
Reply
Answers (
1
)
windows service uninstall
help!