guess-the-card/Form1.cs

31 lines
685 B
C#

namespace GuessTheCard
{
public partial class Form1 : Form
{
private int score = 0;
private int previousDice;
private Random random = new Random();
public Form1()
{
InitializeComponent();
int randomDice = random.Next(1, 7);
previousDice = randomDice;
labelCard.Text = "Result : " + randomDice;
labelScore.Text = "Score: " + score;
}
private void buttonHigh_Click(object sender, EventArgs e)
{
PlayRound(1);
}
private void buttonLow_Click(object sender, EventArgs e)
{
PlayRound(0);
}
}
}