for obj in self.objects:
sleep(0.1)
self.add_object(obj)
for agent in self.agents:
sleep(0.1)
self.add_agent(agent)
Since add_agent and add_objects will add new objects, the loop will not terminate
revise opinion:
for obj in self.objects:
sleep(0.1)
#self.add_object(obj)
obj.host_world_id = self.id # Set the overworld ID of the object
obj.launch_websocket_thread() # Start the object's WebSocket thread
for agent in self.agents:
sleep(0.1)
#self.add_agent(agent)
agent.host_world_id = self.id
agent.launch()
genworlds/worlds/abstracts/world.py:
Since add_agent and add_objects will add new objects, the loop will not terminate
revise opinion: