appstate module¶
Module implementing a global application state.
-
class
appstate.AppState¶ Class to hold the application state.
-
enable_console_logger()¶
-
enable_file_logger(file_path)¶
-
get_clock()¶
-
get_event_manager()¶
-
get_experiment()¶
-
get_logger()¶
-
get_save_simulation_renders()¶
-
static
get_state()¶ Static method to get an application state object. The first time this method is called, an application state object is created. Afterwards, on subsequent calls that same object will be returned.
Returns: AppState – the application state object.
-
get_t()¶
-
get_world()¶
-
increment_t()¶ Increment the simulation clock by one tick.
-
is_running()¶
-
reset()¶
-
running= True¶
-
save_simulation_renders= False¶
-
set_clock(clock)¶
-
set_event_manager(event_manager)¶
-
set_experiment(experiment)¶
-
set_t(t)¶
-
set_world(world)¶
-
state= None¶
-
t= 0¶
-
toggle_pause()¶
-
toggle_saving_simulation_renders()¶ Toggle whether simulation renders should be saved on or off, depending on the current setting.
-