def test_all_random(): properties = {'mode' : 'chaotic', 'flooding' : 'true' } count_fuzzy = 10 max_height_fuzzy = 50 max_width_fuzzy = 50 fuzzy = [ worlds.create_one_random(random.randint(5, max_height_fuzzy), random.randint(5, max_width_fuzzy), properties ) for _ in range(count_fuzzy) ] properties = { 'mode' : 'balanced', 'lambdas' : 0.05, 'stones' : 0.3, 'walls' : 0.0, 'earth_to_empty' : 1.0 } count_balanced = 3 height_balanced = 300 width_balanced = 300 balanced1 = [ worlds.create_one_random(height_balanced, width_balanced, properties ) for _ in range(count_balanced) ] properties = {'mode' : 'mazes' } count_mazes = 5 height_mazes = 500 width_mazes = 500 mazes = [ worlds.create_one_random(height_mazes, width_mazes, properties ) for _ in range(count_mazes) ] return test_world_list(chain( fuzzy, balanced1, mazes ))
def test_fuzzy(count, min_width = 5, max_width = 1000, min_height = 5, max_height = 1000, with_water = False): properties = {'mode' : 'chaotic'} if with_water: properties['flooding'] = 1 # portions of maps with water return test_world_list([ worlds.create_one_random(random.randint(min_height, max_height), random.randint(min_width, max_width), properties ) for _ in range(count) ])