Implemented Global Distances for Maze Rooms

Implemented the calculation of global distances for maze rooms.