class SubAppState:
    """
    This class implements the concept (pretty much) of Game State but in the sub app level.

    :param sub_application: the sub application where the state is defined
    """

    def __init__(self, sub_application):
        self.sub_application = sub_application
        self.active = False

    def init(self) -> None:
        """
        Initialisation of the state
        """
        self.active = True

    def update(self) -> None:
        """
        the update phase of the state, where variables change
        """
        raise NotImplementedError("Please Implement this method")

    def render(self) -> None:
        """
        the render part : how to display the state
        """
        raise NotImplementedError("Please Implement this method")

    def pause(self) -> None:
        """
        Pause the state
        """
        self.active = not self.active

    def clean(self) -> None:
        """
        The state is destroyed. Clean all elements of the state
        """
        self.active = False
