• 0

C# Program


Question

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!

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)
	}

}
}

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.