]> Untitled Git - axy/ft/a-maze-ing.git/commitdiff
je sais plus ce que j'ai fait
authorLucas Flores <luflores@k1r1p8.42mulhouse.fr>
Tue, 10 Feb 2026 14:41:18 +0000 (15:41 +0100)
committerLucas Flores <luflores@k1r1p8.42mulhouse.fr>
Tue, 10 Feb 2026 14:41:18 +0000 (15:41 +0100)
__main__.py
amazeing/maze_class/__init__.py
amazeing/maze_class/maze.py
amazeing/maze_class/maze_walls.py

index 7c239cca7c8131ab5f199281fc86510eb7b6ab4f..2d8406b0c9ae265e899253116ec4032148cf3864 100644 (file)
@@ -9,7 +9,7 @@ from time import sleep
 
 # random.seed(42)
 
-dims = (10, 10)
+dims = (50, 15)
 
 maze = Maze(dims)
 
index 210ff0ee3db1df68bc140c4420b12094f29d3633..b9dcb9b97909f5f0d3e76f132ad39329a22426a2 100644 (file)
@@ -1,13 +1,13 @@
+__author__ = "agilliar & luflores"
+
 from .maze import Maze
 from .maze_pattern import Pattern
 from .maze_walls import (MazeWall, NetworkID, Orientation,
-                         WallCoord, WallNetwork)
+                         WallCoord)
 
-all = [
-    Maze,
-    Pattern,
-    MazeWall,
-    NetworkID,
-    Orientation,
-    WallCoord,
-    WallNetwork]
+__all__ = ["Maze",
+           "Pattern",
+           "MazeWall",
+           "NetworkID",
+           "Orientation",
+           "WallCoord",]
index e94ff0278bf3ea0f3df2729317ccbd74057ae4d1..bb41fde5f8f0d467ac09611fb09c44d35f07e963 100644 (file)
@@ -1,6 +1,6 @@
 from typing import Callable, Generator, Iterable, cast
-from .maze_walls import (MazeWall, NetworkID,
-                         Orientation, WallCoord, WallNetwork)
+from .maze_walls import (MazeWall, NetworkID, WallNetwork,
+                         Orientation, WallCoord)
 
 
 class Maze:
index d4f0faf8778b1a36bc10423b459c5162b68ab375..ad000f0a06abefff8dfa840a42238d669f03c144 100644 (file)
@@ -1,6 +1,5 @@
 from enum import Enum, auto
 from typing import Iterable, Optional, cast
-
 from ..maze_display import PixelCoord
 
 
@@ -12,6 +11,21 @@ class NetworkID:
         NetworkID.__uuid_gen += 1
 
 
+class WallNetwork:
+    def __init__(self) -> None:
+        from .maze_walls import WallCoord
+        self.walls: set[WallCoord] = set()
+
+    def size(self) -> int:
+        return len(self.walls)
+
+    def add_wall(self, id: "WallCoord") -> None:
+        self.walls.add(id)
+
+    def remove_wall(self, id: "WallCoord") -> None:
+        self.walls.remove(id)
+
+
 class MazeWall:
     def __init__(self, network_id: Optional[NetworkID] = None) -> None:
         self.network_id: Optional[NetworkID] = network_id
@@ -126,17 +140,3 @@ class CellCoord:
 
     def y(self) -> int:
         return self.__y
-
-
-class WallNetwork:
-    def __init__(self) -> None:
-        self.walls: set[WallCoord] = set()
-
-    def size(self) -> int:
-        return len(self.walls)
-
-    def add_wall(self, id: WallCoord) -> None:
-        self.walls.add(id)
-
-    def remove_wall(self, id: WallCoord) -> None:
-        self.walls.remove(id)