maze.cpp has a bug