-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstage.py
43 lines (32 loc) · 1006 Bytes
/
stage.py
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
from typing import List
from rng import RNG, StagesSeeds
class Stage:
seed: int
rng: RNG
verbose: int
def __init__(self, seed: int, verbose: int = 0):
self.seed = seed
self.rng = StagesSeeds(seed, verbose)
self.verbose = verbose
class World:
stage: List[Stage]
seed_generator: RNG
verbose: int
def __init__(self, seed_generator: RNG, verbose: int = 0):
self.seed_generator = seed_generator
self.verbose = verbose
self.stage = []
verbose_str = ""
if self.verbose > 0:
verbose_str += "Initializing World"
if verbose_str:
print(verbose_str)
self.generate_stage()
def generate_stage(self):
verbose_str = ""
if self.verbose > 0:
verbose_str += "Generating Stages"
if verbose_str:
print(verbose_str)
for var in range(0, 0xD):
self.stage.append(Stage(self.seed_generator.next(), self.verbose))