diff --git a/main.py b/main.py index fd06790..c8d4559 100644 --- a/main.py +++ b/main.py @@ -23,7 +23,7 @@ GRID_WIDTH = 20 # Number of cells horizontally GRID_HEIGHT = 15 # Number of cells vertically CELL_SIZE = 20 # Size of each cell in pixels -DEFAULT_TPS = 200 # Amount of ticks per second for the simulation +DEFAULT_TPS = 20 # Amount of ticks per second for the simulation class Camera: diff --git a/world/render_objects.py b/world/render_objects.py index 84986aa..207c1cd 100644 --- a/world/render_objects.py +++ b/world/render_objects.py @@ -21,10 +21,10 @@ class FoodObject: def tick(self): self.decay += 1 - if (self.decay > 255): + if self.decay > 255: self.decay = 0 def render(self, camera, screen): if camera.is_in_view(*self.position.get_position()): - pygame.draw.circle(screen, (255,self.decay,0), camera.world_to_screen(*self.position.get_position()), 5 * camera.zoom) + pygame.draw.circle(screen, (255-self.decay,self.decay,0), camera.world_to_screen(*self.position.get_position()), 5 * camera.zoom)