samedi 8 août 2015

C# BackColor Conditions in Bingo program

I've created a bingo program and I having some trouble in the pattern phase here is the function I've created

private void win_check()
    {
        //patternoneWIN
        if (b1.BackColor = Color.White && b2.BackColor = Color.White && b3.BackColor = Color.White && b4.BackColor = Color.White && b5.BackColor = Color.White && i1.BackColor = Color.White && i5.BackColor = Color.White && n1.BackColor = Color.White && n5.BackColor = Color.White && g1.BackColor = Color.White && g5.BackColor = Color.White && o1.BackColor = Color.White && o2.BackColor = Color.White && o3.BackColor = Color.White && o4.BackColor = Color.White && o5.BackColor = Color.White)
        {
            MessageBox.Show("You have won!");
        }

    }

need help to make my program better

Aucun commentaire:

Enregistrer un commentaire