cyaron icon indicating copy to clipboard operation
cyaron copied to clipboard

Support generating maze maps

Open weilycoder opened this issue 1 year ago • 0 comments

示例:

import random

random.seed(4)

from cyaron import generate_maze

for row in generate_maze(21, 21):
    print(*row, sep='')

输出:

#####################
#.#.#.........#.....#
#.#.###.###.#####.###
#...#.....#...#.#...#
#.#####.###.###.#.###
#.#.#.....#...#.....#
#.#.###.###.###.###.#
#...#.....#.......#.#
###.###.###.#.#.###.#
#.#.#..S..#.#.#.#...#
#.#.###.#########.#.#
#...#.#.#.....#...#.#
#.###.###.#######.###
#.#.......#.#.#.....#
#.###.###.#.#.###.#.#
#.....#.........#.#.#
#.#.#.###.#.###.###.#
#.#.#.#.#.#.#.......#
#.#####.#######.#.#.#
#.........T...#.#.#.#
#####################

https://github.com/luogu-dev/cyaron/issues/104

weilycoder avatar Nov 20 '24 10:11 weilycoder