Create variables

This commit is contained in:
Dita Aji Pratama 2026-04-11 12:01:34 +07:00
parent eee5a380ca
commit e742d92a47

View File

@ -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;
} }