def check_win(played_moves):
    """
    Checks if one of the players has won the game and returns the winner's marker
    :param played_moves: List of all the moves that are played
    :return: The winner: X or O
    """
    win_cases = [(7, 8, 9), (4, 5, 6), (1, 2, 3), (7, 4, 1,), (8, 5, 2), (9, 6, 3), (7, 5, 3), (9, 5, 1)]
    for case in win_cases:
        if played_moves[case[0]] == played_moves[case[1]] == played_moves[case[2]] == "X":
            return "X"
        elif played_moves[case[0]] == played_moves[case[1]] == played_moves[case[2]] == "O":
            return "O"