Help on Tic Tac Toe Windows Form Application

I'm doing a Windows Form Application and I'm trying to do a Tic Tac Toe game and I'm trying to make void function to get a winner but I need help because I don't know how to equate the text of the button to each other in the void winner function. Thanks in advance.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  

private: System::Void A1_Click(System::Object^  sender, System::EventArgs^  e) {

          bool turn = true;

	 if (turn)
	   A1->Text = "X";
	 
        else
          A1->Text = "O";

     turn = !turn;
     winner();
}
     void winner()
{
	if (A1 = A2 && A2 = A3)
		label1-> Text= "Winner";			 
					
}
Last edited on
Topic archived. No new replies allowed.