Maze drawing algorithm works