C++ class solves a 3D maze using an adaptation of Dijkstra's algorithm