Add main code

This commit is contained in:
Garmelon 2016-02-12 18:43:01 +01:00
parent f030164a8d
commit 4a929288fd

View file

@ -125,3 +125,12 @@ class Maze:
Save a png image of the maze in path.
"""
pass
if __name__ == "__main__":
maze = Maze(*sys.argv[1:])
maze.generate()
print(maze)
stats = maze.get_stats()
print("Paths: {}\nWalls: {}".format(stats["o"], stats["x"]))
maze.save_image("maze.png")
print("Saved maze as maze.png")