|
@@ -59,5 +59,15 @@ class Pygame(XyzPygame):
|
59
|
59
|
self.draw_surface(point, smell_food_surface)
|
60
|
60
|
|
61
|
61
|
def _key_pressed(self, key):
|
62
|
|
- self._is_display_pheromones = key == pygame.K_p
|
63
|
|
- self._is_display_smells = key == pygame.K_s
|
|
62
|
+
|
|
63
|
+ if key == pygame.K_p:
|
|
64
|
+ if self._is_display_pheromones:
|
|
65
|
+ self._is_display_pheromones = False
|
|
66
|
+ else:
|
|
67
|
+ self._is_display_pheromones = True
|
|
68
|
+
|
|
69
|
+ if key == pygame.K_s:
|
|
70
|
+ if self._is_display_smells:
|
|
71
|
+ self._is_display_smells = False
|
|
72
|
+ else:
|
|
73
|
+ self._is_display_smells = True
|