Made the success check to be called everytime move is called in Maze and also at the end of the code.