def setup(self): """ setup the attributes of this gameengine\n :return: """ Controller.setup(self) self.__create_memento() n_cpus = resource.get_value("n_cpus") packet_val_min = resource.get_value("packet_val_min") packet_val_max = resource.get_value("packet_val_max") self.__trash = Trash() trash_dimen = resource.get_dimen("trash") self.__trash.set_pos(trash_dimen.x, trash_dimen.y) # generates cpus with unique values vals = tools.unique_vals(n_cpus, packet_val_min, packet_val_max) for val in vals: self.__cpus.append(CPU(val)) for i in range(0, resource.get_value("buffer_size_start")): self.add_packet() player_dimen = resource.get_dimen("player") self.__player.set_pos(player_dimen.x, player_dimen.y)
def setup(self): """ :return: """ Controller.setup(self)