def PyLogo(world_class=World, caption=None, gui_left_upper=None, gui_right_upper=None, agent_class=Agent, patch_class=Patch, auto_setup=True, patch_size=11, board_rows_cols=(51, 51), clear=None, bounce=None, fps=None): if gui_left_upper is None: gui_left_upper = [] if caption is None: caption = utils.extract_class_name(world_class) sim_engine = SimEngine(gui_left_upper, caption=caption, gui_right_upper=gui_right_upper, patch_size=patch_size, board_rows_cols=board_rows_cols, clear=clear, bounce=bounce, fps=fps) gui.WINDOW.read(timeout=10) the_world = world_class(patch_class, agent_class) gui.WINDOW.read(timeout=10) sim_engine.top_loop(the_world, auto_setup=auto_setup)
def PyLogo(world_class=World, caption=None, gui_elements=None, agent_class=Agent, patch_class=Patch, patch_size=11, bounce=True, fps=None): if gui_elements is None: gui_elements = [] if caption is None: caption = utils.extract_class_name(world_class) sim_engine = SimEngine(gui_elements, caption=caption, patch_size=patch_size, bounce=bounce, fps=fps) sim_engine.top_loop(world_class, patch_class, agent_class)
def __str__(self): clas_string = utils.extract_class_name(self.__class__) return f'{clas_string}{(self.x, self.y)}'