mirror of
https://github.com/maoakeEnterprise/amazing.git
synced 2026-04-29 00:14:34 +02:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d534993f4c | |||
| b317f7a3a0 |
+3
-6
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user