Apr-26-2018, 08:01 PM
I'm trying to code a Tic Tac Toe game but this function
list_ is initialized as
def updateSymbols(keys, cursorPos, turn): if keys[K_SPACE] and list_[cursorPos] == '': list_[cursorPos] = turn if turn == 'X': return 'O' elif turn == 'O': return 'X' else: return ''always changes the list_[cursorPos] to None, instead of turn.
list_ is initialized as
list_=['','','','','','','','','']and turn as
turn = 'X'The function is called in
turn = updateSymbols(keys, cursorPos, turnAny solutions?