From 2c7b565137cc4691ffb839bbe239a5075a128ab2 Mon Sep 17 00:00:00 2001 From: maoake Date: Tue, 31 Mar 2026 20:29:01 +0200 Subject: [PATCH] give a checkpoint to the project blink the 42 --- a_maze_ing.py | 7 +++---- config.txt | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/a_maze_ing.py b/a_maze_ing.py index c6138f6..5680265 100644 --- a/a_maze_ing.py +++ b/a_maze_ing.py @@ -249,7 +249,9 @@ class MazeMLX: color = next(self.color_gen_ft) color else: + self.update_maze(amazing.maze.get_maze()) self.draw_ft(amazing.maze.get_maze()) + self.put_start_end(amazing) self.redraw_image() def shift_color(self): @@ -277,14 +279,12 @@ class MazeMLX: try: next(self.generator) self.update_maze(amazing.maze.get_maze()) - self.put_start_end(amazing) return False except StopIteration: pass return True def handle_key_press(self, keycode: int, amazing: AMazeIng) -> None: - print(keycode) if keycode == 49: self.restart_maze(amazing) self.print_path = False @@ -298,7 +298,6 @@ class MazeMLX: self.close_loop(None) def handle_key_press_mteriier(self, keycode: int, amazing: AMazeIng) -> None: - print(keycode) if keycode == 38: self.restart_maze(amazing) self.print_path = False @@ -326,7 +325,7 @@ class MazeMLX: def main() -> None: mlx = None try: - mlx = MazeMLX(1800, 1800) + mlx = MazeMLX(1000, 1000) config = Parsing.DataMaze.get_data_maze("config.txt") amazing = AMazeIng(**config) mlx.start(amazing) diff --git a/config.txt b/config.txt index ec9b1e7..d3cd73e 100644 --- a/config.txt +++ b/config.txt @@ -1,5 +1,5 @@ -WIDTH=30 -HEIGHT=30 +WIDTH=13 +HEIGHT=13 ENTRY=1,1 EXIT=5,5 OUTPUT_FILE=maze.txt