edit: I got it to work. I am not really happy with it because I feel like I had to change it because I couldn’t understand what was wrong. I think I will come back to it later after I have learned more stuff and hopefully it will make more sense.
I am very close to being finished but keep getting stuck!
When it is the ai’s turn, it goes several times in a row instead of just one time.
I have tried to make the ai go only when I do a click, but it goes several times after one click.
Any help is appreciated!
update: made clicking already occupied squares impossible.
I cannot get x to go first everytime