3 Commits

Author SHA1 Message Date
Maoake Teriierooiterai b6067b2045 finish the thing 2026-04-03 12:30:42 +02:00
Maoake Teriierooiterai 9c76914366 makefile update 2026-04-03 11:45:38 +02:00
Maoake Teriierooiterai b38da3fc31 need to verify everything on each files scan every line every pixel cause i like pixel its pretty beautiful 2026-04-03 11:36:40 +02:00
5 changed files with 17 additions and 6 deletions
+2 -2
View File
@@ -13,10 +13,10 @@ run_windows:
.venv\Scripts\python -m a_maze_ing config.txt .venv\Scripts\python -m a_maze_ing config.txt
debug: debug:
uv pdb python3 a_maze_ing.py config.txt uv run python3 -m pdb a_maze_ing.py config.txt
clean: clean:
rm -rf */**/__pycache__ */__pycache__ __pycache__ .mypy_cache .venv dist build */**/*.egg-info */*.egg-info *.egg-info test.txt rm -rf */**/__pycache__ */__pycache__ __pycache__ */.mypy_cache .mypy_cache .venv dist build */**/*.egg-info */*.egg-info *.egg-info test.txt
fclean: clean fclean: clean
rm mazegen-1.0.0-py3-none-any.whl rm mazegen-1.0.0-py3-none-any.whl
+1 -1
View File
@@ -474,7 +474,7 @@ class MazeMLX:
self.mlx.mlx_loop_hook(self.mlx_ptr, self.draw_image, amazing) self.mlx.mlx_loop_hook(self.mlx_ptr, self.draw_image, 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(
self.win_ptr, 2, 1 << 0, self.handle_key_press_mteriier, amazing self.win_ptr, 2, 1 << 0, self.handle_key_press, amazing
) )
self.mlx.mlx_loop(self.mlx_ptr) self.mlx.mlx_loop(self.mlx_ptr)
+11 -2
View File
@@ -2,7 +2,16 @@ WIDTH=10
HEIGHT=10 HEIGHT=10
ENTRY=1,1 ENTRY=1,1
EXIT=10,10 EXIT=10,10
OUTPUT_FILE=maze.txt OUTPUT_FILE=con
PERFECT=True PERFECT=True
GENERATOR=Kruskal GENERATOR=DFS
SOLVER=AStar SOLVER=AStar
salut
#
#
#
#
#
#
#
##
+2
View File
@@ -36,6 +36,8 @@ class AMazeIng(BaseModel):
raise ValueError("Entry coordinates exceed the maze size") raise ValueError("Entry coordinates exceed the maze size")
if self.exit[0] > self.width or self.exit[1] > self.height: if self.exit[0] > self.width or self.exit[1] > self.height:
raise ValueError("Exit coordinates exceed the maze size") raise ValueError("Exit coordinates exceed the maze size")
if self.entry == self.exit:
raise ValueError("Entry and Exit coordinates cant be the same")
return self return self
def generate(self) -> Generator[Maze, None, None]: def generate(self) -> Generator[Maze, None, None]:
+1 -1
View File
@@ -371,7 +371,7 @@ class DepthFirstSearch(MazeGenerator):
if seed is not None: if seed is not None:
np.random.seed(seed) np.random.seed(seed)
maze = self.init_maze(width, height) maze = self.init_maze(width, height)
if width > 9 and height > 9: if width > 10 and height > 10:
self.forty_two = self.get_cell_ft(width, height) self.forty_two = self.get_cell_ft(width, height)
visited: NDArray[np.object_] = np.zeros((height, width), dtype=bool) visited: NDArray[np.object_] = np.zeros((height, width), dtype=bool)
if ( if (