Merge remote-tracking branch 'origin/main'

This commit is contained in:
steffen-illium
2021-05-18 11:26:45 +02:00
2 changed files with 11 additions and 4 deletions

View File

@ -40,7 +40,7 @@ class GettingDirty(BaseFactory):
height, width = self.state.shape[1:]
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)]
agents = [Entity('agent', pos) for pos in np.argwhere(self.state[h.AGENT_START_IDX] > h.IS_FREE_CELL)]