2 Commits

Author SHA1 Message Date
mteriier d534993f4c starting my branch need to rush this 2026-03-28 23:01:42 +01:00
da7e b317f7a3a0 FIX(path render): path render was called twice 2026-03-27 21:42:14 +01:00
+3 -6
View File
@@ -1,4 +1,4 @@
from typing import Any, Generator from typing import Any
from src.AMazeIng import AMazeIng from src.AMazeIng import AMazeIng
from src.parsing import Parsing from src.parsing import Parsing
from mlx import Mlx from mlx import Mlx
@@ -172,6 +172,7 @@ class MazeMLX:
def start(self, amazing: AMazeIng) -> None: def start(self, amazing: AMazeIng) -> None:
self.restart_maze(amazing) self.restart_maze(amazing)
self.restart_path(amazing)
self.mlx.mlx_loop_hook(self.mlx_ptr, self.render_maze, amazing) self.mlx.mlx_loop_hook(self.mlx_ptr, self.render_maze, amazing)
self.mlx.mlx_hook(self.win_ptr, 33, 0, self.close_loop, None) self.mlx.mlx_hook(self.win_ptr, 33, 0, self.close_loop, None)
self.mlx.mlx_hook( self.mlx.mlx_hook(
@@ -199,11 +200,7 @@ class MazeMLX:
# time.sleep(0.01) # time.sleep(0.01)
except StopIteration: except StopIteration:
if self.path_printer is not None: if self.path_printer is not None:
try: self.render_path()
next(self.path_printer)
time.sleep(0.03)
except StopIteration:
pass
def main() -> None: def main() -> None: