Create variables
This commit is contained in:
parent
eee5a380ca
commit
e742d92a47
4
Form1.cs
4
Form1.cs
@ -3,13 +3,15 @@ namespace GuessTheCard
|
|||||||
public partial class Form1 : Form
|
public partial class Form1 : Form
|
||||||
{
|
{
|
||||||
private int score = 0;
|
private int score = 0;
|
||||||
|
private int previousDice;
|
||||||
|
private Random random = new Random();
|
||||||
|
|
||||||
public Form1()
|
public Form1()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
Random random = new Random();
|
|
||||||
int randomDice = random.Next(1, 7);
|
int randomDice = random.Next(1, 7);
|
||||||
|
previousDice = randomDice;
|
||||||
labelCard.Text = "Result : " + randomDice;
|
labelCard.Text = "Result : " + randomDice;
|
||||||
labelScore.Text = "Score: " + score;
|
labelScore.Text = "Score: " + score;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user