From e742d92a47a3ae115f7c2126fe8a6f0fdefb9e22 Mon Sep 17 00:00:00 2001 From: Dita Aji Pratama Date: Sat, 11 Apr 2026 12:01:34 +0700 Subject: [PATCH] Create variables --- Form1.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Form1.cs b/Form1.cs index ce5b91b..5854146 100644 --- a/Form1.cs +++ b/Form1.cs @@ -3,13 +3,15 @@ namespace GuessTheCard public partial class Form1 : Form { private int score = 0; + private int previousDice; + private Random random = new Random(); public Form1() { InitializeComponent(); - Random random = new Random(); int randomDice = random.Next(1, 7); + previousDice = randomDice; labelCard.Text = "Result : " + randomDice; labelScore.Text = "Score: " + score; }