added main
This commit is contained in:
@@ -41,4 +41,13 @@ def get_neighbors(maze: TurtleMaze, cell: Cell) -> list[Cell]:
|
||||
if not west.isBlocked():
|
||||
neighbors.append(west)
|
||||
|
||||
return neighbors
|
||||
return neighbors
|
||||
|
||||
def main():
|
||||
maze = TurtleMaze('maze_1.txt')
|
||||
|
||||
start = maze.getStart()
|
||||
print("Start cell:", start)
|
||||
|
||||
neighbors = get_neighbors(maze, start)
|
||||
print("Neighbors of start:", neighbors)
|
||||
Reference in New Issue
Block a user