mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-07-06 17:41:36 +02:00
New Szenario "Two_Rooms_One_Door"
This commit is contained in:
@ -10,3 +10,15 @@ class Zones(Objects):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(Zones, self).__init__(*args, can_collide=True, **kwargs)
|
||||
|
||||
def by_pos(self, pos):
|
||||
return self.pos_dict[pos]
|
||||
|
||||
def notify_add_entity(self, entity: Zone):
|
||||
self.pos_dict.update({key: [entity] for key in entity.positions})
|
||||
return True
|
||||
|
||||
def notify_del_entity(self, entity: Zone):
|
||||
for pos in entity.positions:
|
||||
self.pos_dict[pos].remove(entity)
|
||||
return True
|
||||
|
Reference in New Issue
Block a user