def check_winner(state: GameState) -> int or None: global winner if _check_winner(state): return winner elif len(state.get_possible_moves()) == 0: winner = TIE return TIE return NO_PLAYER