Creating and solving mazes