Making tig tag toe in c#

This is my 1st game and got told to make tig tag toe in c#. Iv got 2 player wolker :slight_smile: but now trying 1 player (AI). but do not know where to start. Know the rules eg if center is empty, if plaery 1 has 2 in row block … but dont know how to get AI to click on button for 2 player i have

if (GUI.Button (new Rect (100, 240, 50, 50), counter1, box)&& hasBeenPressed1)
			{
				if (player == 1) 
				{
					counter1 = "X";
					player ++;
					turnCount ++;
					p1row1 ++;
					p1col1 ++;
					p1cro1 ++;

				
				} else {
					counter1 = "O";
					player --;
					turnCount ++;
					p2row1 ++;
					p2col1 ++;
					p2cro1 ++;
			
			}
			hasBeenPressed1 = false;
			}

on each box can some one please point me in the right way thanks

  1. Google is your friend.
  2. Convert what you learn into Unity.

Created a tick tack toe game with different approach and made a tutorial also pls do check out.
Link:link text