mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-06-25 04:41:34 +02:00
Remove BoundDestination Object
New Variable 'var_can_be_bound' Observations adjusted accordingly
This commit is contained in:
@ -92,11 +92,11 @@ class HasBoundMixin:
|
||||
def by_entity(self, entity):
|
||||
try:
|
||||
return next((x for x in self if x.belongs_to_entity(entity)))
|
||||
except StopIteration:
|
||||
except (StopIteration, AttributeError):
|
||||
return None
|
||||
|
||||
def idx_by_entity(self, entity):
|
||||
try:
|
||||
return next((idx for idx, x in enumerate(self) if x.belongs_to_entity(entity)))
|
||||
except StopIteration:
|
||||
except (StopIteration, AttributeError):
|
||||
return None
|
||||
|
Reference in New Issue
Block a user