I am trying to create a simple tic-tac-toe game in Python using turtle graphics and I was having some trouble alternating between the circles and crosses. This is the section from my current code:
drawBoard()
tracker = True
count = 0
while count < 9:
if tracker:
turtle.onscreenclick(position_circle)
print(1)
tracker = False
elif not tracker:
turtle.onscreenclick(position_cross)
print(2)
tracker = True
count += 1
turtle.done()
Whenever I run the code, the turtle always outputs circles. I added a print statement to let me know whether it was alternating and this is the output:
1
2
1
2
1
2
1
2
1
I don't know to how to "pause" the loop to actually draw the circle or cross. Any help would be appreciated!