maze generation and solution