Jun-03-2020, 04:08 PM
I am making a tic tac toe game and I set a while loop = game but when I call my check_X_Repeat function to make it false it does not do so I want to know why the function does not set it False when it meets the criteria, thanks!
def user_X(): global counter counter += 1 correct = True while True: while correct: try: show() user_X = input("'X' type a number: ") user_X = int(user_X) # Check for X check_X_Repeat(user_X) except ValueError: print("Type a number...") else : pass # X is placed board[user_X] = 'X' break # Check def check_X_Repeat(user_X): global correct if board[user_X] != 'X': correct = False return else : print("Try again..") return return