SI_InteligentnyWozekWidlowy/util/PathByEnum.py

17 lines
546 B
Python
Raw Normal View History

2022-05-26 19:22:51 +02:00
from random import random
2022-05-26 19:27:40 +02:00
from data.enum.ItemType import ItemType
2022-05-26 19:22:51 +02:00
class PathByEnum:
2022-05-26 19:27:40 +02:00
def get_random_path(self, item:ItemType):
if item == ItemType.DOOR:
2022-05-26 19:22:51 +02:00
a = str(random.randint(1, 10))
return "item_images/door/drzwi" + a + ".jpg"
2022-05-26 19:27:40 +02:00
if item == ItemType.EGG:
2022-05-26 19:22:51 +02:00
a = str(random.randint(1, 10))
return "item_images/refrigerator/lodowka" + a + ".jpg"
2022-05-26 19:27:40 +02:00
if item == ItemType.SHELF:
2022-05-26 19:22:51 +02:00
a = str(random.randint(1, 10))
return "item_images/shelf/polka" + a + ".jpg"