This commit is contained in:
Makrellka 2022-05-26 19:27:40 +02:00
parent bf4d4aaeaa
commit bc5bdf6fa4

View File

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