-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocgen.py
More file actions
78 lines (66 loc) · 1.67 KB
/
procgen.py
File metadata and controls
78 lines (66 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
from __future__ import annotations
from typing import TYPE_CHECKING
from dungeon.bsp import BSP
from dungeon.diffusion_limited_aggregation import DiffusionLimitedAggregation
from dungeon.diffusion_limited_aggregation_2 import DiffusionLimitedAggregation2
from dungeon.drunkards_walk import DrunkardsWalk
from dungeon.simple import Simple
from dungeon.simple_labyrinth import SimpleLabyrinth
from game_map import GameMap
if TYPE_CHECKING:
from engine import Engine
def generate_dungeon(
max_rooms: int,
room_min_size: int,
room_max_size: int,
map_width: int,
map_height: int,
engine: Engine
) -> GameMap:
"""
generator = Simple(
max_rooms=max_rooms,
room_min_size=room_min_size,
room_max_size=room_max_size,
map_width=map_width,
map_height=map_height,
engine=engine
)
"""
"""
generator = BSP(
room_min_size=room_min_size,
room_max_size=room_max_size,
map_width=map_width,
map_height=map_height,
engine=engine
)
"""
"""
generator = SimpleLabyrinth(
room_min_size=room_min_size,
map_width=map_width,
map_height=map_height,
engine=engine
)
"""
"""
generator = DrunkardsWalk(
map_width=map_width,
map_height=map_height,
engine=engine
)
"""
"""
generator = DiffusionLimitedAggregation(
map_width=map_width,
map_height=map_height,
engine=engine
)
"""
generator = DiffusionLimitedAggregation2(
map_width=map_width,
map_height=map_height,
engine=engine
)
return generator.generate_dungeon()