def resolve(code):
    """
    code: tuple representing the result of the action and the responsible player
          - 0 represents a valid action without a win
          - 1 represents a win
          - 2 represents a paradox


    Returns 1 if the game continues, 0 if the game ends. Prints a message if needed.
    """
    code, player = code

    assert(code in (0, 1, 2))

    if code == 0:
        return 1
    elif code == 1:
        print(f"\n{player} won the game.")
        return 0
    else:
        print(f"\n{player} created a paradox.")
        return 0