Create MazeCommon.java

Common maze functions used by algorithms