diff --git a/util/PathByEnum.py b/util/PathByEnum.py index ac22fa3..efe2cee 100644 --- a/util/PathByEnum.py +++ b/util/PathByEnum.py @@ -1,14 +1,16 @@ from random import random +from data.enum.ItemType import ItemType + class PathByEnum: - def get_random_path(self, item): - if item == 1: + def get_random_path(self, item:ItemType): + if item == ItemType.DOOR: a = str(random.randint(1, 10)) return "item_images/door/drzwi" + a + ".jpg" - if item == 2: + if item == ItemType.EGG: a = str(random.randint(1, 10)) return "item_images/refrigerator/lodowka" + a + ".jpg" - if item == 3: + if item == ItemType.SHELF: a = str(random.randint(1, 10)) return "item_images/shelf/polka" + a + ".jpg"