switched to opacity in simple_factory_getting_dirty.py

This commit is contained in:
romue 2021-05-18 12:27:36 +02:00
parent 08c7e461b6
commit 5a9a3257ed

View File

@ -39,7 +39,7 @@ class GettingDirty(BaseFactory):
height, width = self.state.shape[1:]
self.renderer = Renderer(width, height, view_radius=2)
dirt = [Entity('dirt', [x, y], min(self.state[DIRT_INDEX, x, y], 1), 'scale')
dirt = [Entity('dirt', [x, y], min(1.1*self.state[DIRT_INDEX, x, y], 1), 'opacity')
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('agent1', pos) for pos in np.argwhere(self.state[h.AGENT_START_IDX] > h.IS_FREE_CELL)]