Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            for (int i = 0; i < 5; i++)
            {
                EngineApp.B[i].BackgroundImage = EngineApp.Pic[i + 5].BackgroundImage;
            }
            int d = EngineApp.Verify(EngineApp.Pic);
            int z = EngineApp.Verify(EngineApp.B);

            if (d > z)
            {
                MessageBox.Show("You win");
            }
            else
            if (d < z)
            {
                MessageBox.Show("You lose ");
            }
            else
            if (EngineApp.sumcarti(EngineApp.Pic) > EngineApp.sumcarti(EngineApp.B))
            {
                MessageBox.Show("You win");
            }
            else
            if (EngineApp.sumcarti(EngineApp.Pic) < EngineApp.sumcarti(EngineApp.B))
            {
                MessageBox.Show("You lose");
            }
            else
            {
                MessageBox.Show("Draw");
            }
        }
Exemple #2
0
 private void pictureBox2_Click(object sender, EventArgs e)
 {
     EngineApp.shuffle(EngineApp.Pic);
     Hands();
     button2.Enabled = true;
     button1.Enabled = true;
 }
Exemple #3
0
 public void Form1_Load(object sender, EventArgs e)
 {
     pictureBox1.Visible = false;
     EngineApp.Generate_deck();
     EngineApp.CardPic(this);
     button2.Enabled = false;
     button1.Enabled = false;
 }
Exemple #4
0
 private void button2_Click(object sender, EventArgs e)
 {
     EngineApp.Ondraw(EngineApp.Pic);
     Hands();
     button2.Enabled = false;
 }