2022-12-11 13:15:23 +01:00
|
|
|
from . import ZillionTestBase
|
2022-11-01 06:45:17 -07:00
|
|
|
|
2024-06-27 08:51:27 +02:00
|
|
|
from .. import ZillionWorld
|
2022-11-01 06:45:17 -07:00
|
|
|
|
|
|
|
|
|
|
|
class SeedTest(ZillionTestBase):
|
|
|
|
auto_construct = False
|
|
|
|
|
|
|
|
def test_reproduce_seed(self) -> None:
|
|
|
|
self.world_setup(42)
|
2024-11-29 12:25:01 -08:00
|
|
|
z_world = self.multiworld.worlds[1]
|
|
|
|
assert isinstance(z_world, ZillionWorld)
|
2022-11-01 06:45:17 -07:00
|
|
|
r = z_world.zz_system.randomizer
|
|
|
|
assert r
|
|
|
|
randomized_requirements_first = tuple(
|
|
|
|
location.req.gun
|
|
|
|
for location in r.locations.values()
|
|
|
|
)
|
|
|
|
|
|
|
|
self.world_setup(42)
|
2024-11-29 12:25:01 -08:00
|
|
|
z_world = self.multiworld.worlds[1]
|
|
|
|
assert isinstance(z_world, ZillionWorld)
|
2022-11-01 06:45:17 -07:00
|
|
|
r = z_world.zz_system.randomizer
|
|
|
|
assert r
|
|
|
|
randomized_requirements_second = tuple(
|
|
|
|
location.req.gun
|
|
|
|
for location in r.locations.values()
|
|
|
|
)
|
|
|
|
|
|
|
|
assert randomized_requirements_first == randomized_requirements_second
|