Breadth-First Search implementation for finding the shortest path on a Maze