From 214d3737484f5a643f012f14299cff88869f1ba6 Mon Sep 17 00:00:00 2001 From: Yashwanth A <123303508+yashwanth2706@users.noreply.github.com> Date: Wed, 12 Nov 2025 07:54:59 +0530 Subject: [PATCH] Add print statements for key event handling Added print statement to print in console when the space bar is clicked --- simulation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/simulation.py b/simulation.py index 31d887c..cf913cb 100644 --- a/simulation.py +++ b/simulation.py @@ -54,6 +54,7 @@ def handle_controls(self): def handle_key(self, event): if event.key == pygame.K_SPACE: + print("Clear Grid") self.restart() elif event.key == pygame.K_s: print("Sand Mode") @@ -100,4 +101,4 @@ def draw_brush(self, window): elif self.mode == "erase": color = (255, 105, 180) - pygame.draw.rect(window, color, (column * self.cell_size, row * self.cell_size, brush_visual_size, brush_visual_size)) \ No newline at end of file + pygame.draw.rect(window, color, (column * self.cell_size, row * self.cell_size, brush_visual_size, brush_visual_size))