pymasep.interface.interface_state ================================= .. py:module:: pymasep.interface.interface_state Classes ------- .. autoapisummary:: pymasep.interface.interface_state.InterfaceState Module Contents --------------- .. py:class:: InterfaceState(sub_application, container_dim=(100, 100)) Bases: :py:obj:`pymasep.application.sub_app_state.SubAppState` This class implements the concept (pretty much) of Game State for the interface :param sub_application: the sub application where the state is defined :param container_dim: pygame_ui general container dimension (in pixel) .. py:attribute:: ui_container :value: None pygame_gui container that include all pygame_gui elements for the state .. py:attribute:: container_dim dimension of the pygame_gui container .. py:method:: init() Initialisation of the state .. py:method:: clean() The state is destroyed. Clean all elements of the state (including ui_container) .. py:method:: pause() Pause the state. Change the ui_container display .. py:method:: handle_event(event) :abstractmethod: Handle events in the state :param event: The event to handle .. py:method:: update() The update phase of the state. For interface, it corresponds to choose action, send action and receive observation. .. py:method:: render(time_delta) The render part : how to display the state .. py:method:: on_receive_observation() Callback when the interface receives an observation