Fixed wrong color for Void when env.void_barrier is set

This commit is contained in:
Dominik Moritz Roth 2022-06-22 13:09:01 +02:00
parent 4cd64a6fbd
commit bb006eceb0

View File

@ -58,10 +58,10 @@ class CnnObservable(Observable):
snap = self.env.surface.subsurface(rect) snap = self.env.surface.subsurface(rect)
self.snap = pygame.Surface((self.in_width, self.in_height)) self.snap = pygame.Surface((self.in_width, self.in_height))
if self.env.void_barrier: if self.env.void_barrier:
col = (223, 0, 0) col = (255, 0, 0)
else: else:
col = (50, 50, 50) col = (50, 50, 50)
pygame.draw.rect(self.snap, (50, 50, 50), pygame.draw.rect(self.snap, col,
pygame.Rect(0, 0, self.in_width, self.in_height)) pygame.Rect(0, 0, self.in_width, self.in_height))
self.snap.blit(snap, (cx - x, cy - y)) self.snap.blit(snap, (cx - x, cy - y))
self.obs = self.scaler( self.obs = self.scaler(