added scaling to simple_factory_getting_dirty.py rendering
This commit is contained in:
@ -39,7 +39,8 @@ class GettingDirty(BaseFactory):
|
|||||||
height, width = self.state.shape[1:]
|
height, width = self.state.shape[1:]
|
||||||
self.renderer = Renderer(width, height, view_radius=0)
|
self.renderer = Renderer(width, height, view_radius=0)
|
||||||
|
|
||||||
dirt = [Entity('dirt', [x, y], self.state[DIRT_INDEX, x, y]) for x, y in np.argwhere(self.state[DIRT_INDEX] > h.IS_FREE_CELL)]
|
dirt = [Entity('dirt', [x, y], min(self.state[DIRT_INDEX, x, y], 1), 'scale')
|
||||||
|
for x, y in np.argwhere(self.state[DIRT_INDEX] > h.IS_FREE_CELL)]
|
||||||
walls = [Entity('dirt', pos) for pos in np.argwhere(self.state[h.LEVEL_IDX] > h.IS_FREE_CELL)]
|
walls = [Entity('dirt', pos) for pos in np.argwhere(self.state[h.LEVEL_IDX] > h.IS_FREE_CELL)]
|
||||||
agents = [Entity('agent', pos) for pos in np.argwhere(self.state[h.AGENT_START_IDX] > h.IS_FREE_CELL)]
|
agents = [Entity('agent', pos) for pos in np.argwhere(self.state[h.AGENT_START_IDX] > h.IS_FREE_CELL)]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user