mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-12-11 01:50:38 +01:00
New Szenario "Two_Rooms_One_Door"
This commit is contained in:
@@ -37,7 +37,7 @@ class Objects:
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self._data = defaultdict(lambda: None)
|
||||
self._observers = list()
|
||||
self._observers = [self]
|
||||
self.pos_dict = defaultdict(list)
|
||||
|
||||
def __len__(self):
|
||||
@@ -52,6 +52,7 @@ class Objects:
|
||||
assert self._data[item.name] is None, f'{item.name} allready exists!!!'
|
||||
self._data.update({item.name: item})
|
||||
item.set_collection(self)
|
||||
# self.notify_add_entity(item)
|
||||
for observer in self.observers:
|
||||
observer.notify_add_entity(item)
|
||||
return self
|
||||
@@ -96,8 +97,6 @@ class Objects:
|
||||
except StopIteration:
|
||||
return None
|
||||
|
||||
|
||||
|
||||
def __getitem__(self, item):
|
||||
if isinstance(item, (int, np.int64, np.int32)):
|
||||
if item < 0:
|
||||
|
||||
Reference in New Issue
Block a user