Added a run maze generator function
This commit is contained in:
parent
870d541d96
commit
4b2b06a929
5
maze.py
5
maze.py
|
@ -25,6 +25,11 @@ class Maze(abc.ABC):
|
||||||
def step(self) -> bool: # returns False when algorithm is done
|
def step(self) -> bool: # returns False when algorithm is done
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def run(self, i=1_000_000) -> bool:
|
||||||
|
for _ in range(i):
|
||||||
|
if not self.step(): return True
|
||||||
|
return False
|
||||||
|
|
||||||
def secondary(self, index: tuple[int,int]) -> bool:
|
def secondary(self, index: tuple[int,int]) -> bool:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue