added rec_move function to generate random maze