def _state_width(state):
    """
    Get the width of a state.

    :arg state: A game state.

    :return: The width of the input state.
    """

    if len(state) == 0:
        return 0
    else:
        return len(state[0])