Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Joueur j  = new Joueur(Joueur.Text);
            Joueur j1 = new Joueur(Joueur1.Text);

            if (this.nbJ1 > this.nbJ2)
            {
                MessageBox.Show(j.Nom + " commence la partie ! ");
                System.Threading.Thread monthread = new System.Threading.Thread(new System.Threading.ThreadStart(jouer));
                monthread.Start();
                this.Close();
            }
            else if (this.nbJ1 == this.nbJ2)
            {
                Relancer.Show();
            }
            else if (this.nbJ1 < this.nbJ2)
            {
                MessageBox.Show(j1.Nom + " commence la partie ! ");
                System.Threading.Thread monthread = new System.Threading.Thread(new System.Threading.ThreadStart(jouer));
                monthread.Start();
                this.Close();
            }
        }
Exemplo n.º 2
0
 public InstanceJoueur()
 {
     InitializeComponent();
     Relancer.Hide();
 }