미로 생성기

예전에 하이텔* 베이직 동호회에서 본 베이직 소스 코드를 고1 무렵에 C로 옮긴 것입니다. 무척 오래 된 소스군요. 하지만 코드 길이에 비해 생성되는 결과가 무척 신기하고, 또 유용할 것입니다.

소스 코드, 실행 파일 받기 (src13_maze.zip, 3K)


실행 결과

Size x:y of maze? 15 15
#.#############################
#.......#...#.........#...#...#
#.#######.#.#.###.###.#.#.#.###
#.#.......#.#...#...#...#.#...#
#.#.###.###.###.###.#.###.###.#
#.#.#.....#.....#...#...#.#...#
#.#.#.###.#.#####.#####.#.###.#
#...#...#.#...#...#...#.#...#.#
#.###.#.#####.#.#####.#####.#.#
#...#.#.....#.#.......#.....#.#
###.#.#####.#######.#########.#
#...#.#.....#...#...#.....#...#
#.###.#.#####.#.#.#######.#.###
#.#...#.#.....#.#.....#...#...#
###.#####.#####.#####.#.#####.#
#...#...#...#...#...#...#.....#
#.###.#.###.#.#####.#.#####.#.#
#.....#.....#.......#.#.....#.#
#.###############.###.###.###.#
#...#.........#.....#...#...#.#
###.#.#.#####.#.#######.#.#.###
#.#.#.#...#...#...#...#...#...#
#.#.#.###.#.#.###.#.###.#####.#
#.#.#.#...#.#.#...#...#.....#.#
#.#.#.#####.#.#######.#.#.###.#
#...#.#...#.#.......#...#...#.#
#####.#.#.#####.###.#.#####.#.#
#.....#.#...#.#...#.#.#...#.#.#
#.#####.###.#.###.###.#.#.#.#.#
#.........#.....#.....#.#...#.#
#############################.#