Fixed bug with path drawing

This commit is contained in:
Dominik Moritz Roth 2022-09-23 22:22:51 +02:00
parent 29f96b1e8c
commit 678d6f620a

View File

@ -277,8 +277,13 @@ class ColumbusEnv(gym.Env):
self.setup()
self.entities.append(self.agent) # add it last, will be drawn on top
self.observable.reset()
self._reset_paths()
return self.observable.get_observation()
def _reset_paths(self):
self.path_overlay = pygame.Surface(
(self.width, self.height), pygame.SRCALPHA, 32)
def _draw_entities(self):
for entity in self.entities:
entity.draw()