but it's simply updating to fast so when the user holds down the mouse button / clicking slow it don't just switch turn 1 time but maybe 100 times witch I don't want I need it to only switch turn one pre click no matter what how can I do this ??
have been traying to fix this bay using thread but i'm not good at using threads so can't get it working
I think you need to switch the turns when the mouse button is released, not down. The problem is your loop is updating so many times while the mouse button is down that it switches the turn 100+ times before the user lets the button up.
Changing turns on a tic tac toe has nothing to do with a mouse click, at least not directly, the turn changes only after the current player successfully places a new mark, if he clicks on an already marked cell, nothing should happen, if he clicks outside the board, nothing should happen, ect.
As for the mouse event, what you want to catch is the moment the mouse button is released and at which screen position that happens.