This commit is contained in:
JO Jr.
2024-01-27 13:04:10 -05:00
parent 24761c91b1
commit 13ae5abe21
+1 -2
View File
@@ -1,7 +1,7 @@
import yaml, os, random
module_root_directory = os.path.dirname(os.path.realpath(__file__))
config_file = os.path.join(module_root_directory,'sizes.yaml')
# TODO: make inputs?
def read_config(item):
with open(config_file, 'r') as file:
return yaml.safe_load(file)[item]
@@ -18,7 +18,6 @@ class RandomSize:
FUNCTION = "func"
def func(self:str,seed):
sizes = read_config('sizes')
print(sizes)
rand_obj = random.Random(seed)
size = rand_obj.choice(sizes)
x, y = [int(v) for v in size.split('x')]