30 lines
		
	
	
		
			855 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			855 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from typing import cast
 | |
| from . import ZillionTestBase
 | |
| 
 | |
| from worlds.zillion import ZillionWorld
 | |
| 
 | |
| 
 | |
| class SeedTest(ZillionTestBase):
 | |
|     auto_construct = False
 | |
| 
 | |
|     def test_reproduce_seed(self) -> None:
 | |
|         self.world_setup(42)
 | |
|         z_world = cast(ZillionWorld, self.multiworld.worlds[1])
 | |
|         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)
 | |
|         z_world = cast(ZillionWorld, self.multiworld.worlds[1])
 | |
|         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
 | 
