mirror of
https://github.com/illiumst/marl-factory-grid.git
synced 2025-07-12 23:52:42 +02:00
fixed names and function, dirtspawn and item spawn
This commit is contained in:
@ -12,7 +12,7 @@ class BoundEntityMixin:
|
||||
if self.bound_entity:
|
||||
return f'{self.__class__.__name__}({self.bound_entity.name})'
|
||||
else:
|
||||
print()
|
||||
pass
|
||||
|
||||
def belongs_to_entity(self, entity):
|
||||
return entity == self.bound_entity
|
||||
|
@ -131,6 +131,7 @@ class EnvObject(Object):
|
||||
return c.VALUE_OCCUPIED_CELL
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
self._bound_entity = None
|
||||
super(EnvObject, self).__init__(**kwargs)
|
||||
|
||||
def change_parent_collection(self, other_collection):
|
||||
|
@ -1,6 +1,6 @@
|
||||
from collections import defaultdict
|
||||
from operator import itemgetter
|
||||
from random import shuffle
|
||||
from random import shuffle, random
|
||||
from typing import Dict
|
||||
|
||||
from marl_factory_grid.environment.groups.objects import Objects
|
||||
@ -26,6 +26,7 @@ class Entities(Objects):
|
||||
|
||||
@property
|
||||
def floorlist(self):
|
||||
shuffle(self._floor_positions)
|
||||
return self._floor_positions
|
||||
|
||||
def __init__(self, floor_positions):
|
||||
|
Reference in New Issue
Block a user