Main done, fonction buildmaze done