'Trying to make ticktack toe in turtle ut having issues with printing alternate shapes

so basically how it works is like the turtle draws lines and then when i click in a quadrant it makes an x or an o alternatively.

or rather that was the plan... im not being able to make it print alternate shapes on each click, it either does only one or both on the same quadrant.

and another problem is that the x and o are turtles so when the program runs, the middle quadrant has an x or an o printed without me even clicking.

so the program is basically all turtle based, it makes a circle or a cross wherever i click, the problem is i cant figure out how to alternate this with cross and circle and how to get rid of the turtle that shows up in the centre

tried this for alternating but it printed the circle and cross on each other -

a while loop for the game and theres two function calls one below the other (idk why i posted the code but it shows errors)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source