def check_win(mat):
    """
    Returns either:

    False: Game not over.
    True: Game won, 2048 is found in mat
    """
    if 2048 in mat:  # If won, teriminal state is needed for RL agent
        return True  # Terminal state
    else:
        return False