Tony Temme

Tony Temme

  • NA
  • 1
  • 1.7k

c# connect four help

Apr 25 2014 10:00 AM
no matter what i try i can not get a winner, i can get each click to shower red/yellow pending whose go it it. once block has ben clicked it can not change colour.

privateoid allbtn_click(object sender, EventArgs e)

{

 

if (((Button)sender).BackColor == Color.Transparent) // if btn colour is transparent then allows colour to change

{

 

if (color == true) //starts if statement

{

((

 

Button)sender).BackColor = Color.Red; //sets button to red

}

 

else // else statement

{

((

 

Button)sender).BackColor = Color.Yellow; //sets button to yellow

}

color = !color;

 

// when colour is true, sets colour to false

}

}

 

Thats for the colour to correspond to clicks, i can not figure out a winner
PLEASE HELP ASAP!!!!
 

Answers (2)