diff --git a/item_images/door/drzwi2.png b/item_images/door/drzwi2.jpg similarity index 100% rename from item_images/door/drzwi2.png rename to item_images/door/drzwi2.jpg diff --git a/util/PathByEnum.py b/util/PathByEnum.py new file mode 100644 index 0000000..ac22fa3 --- /dev/null +++ b/util/PathByEnum.py @@ -0,0 +1,14 @@ +from random import random + + +class PathByEnum: + def get_random_path(self, item): + if item == 1: + a = str(random.randint(1, 10)) + return "item_images/door/drzwi" + a + ".jpg" + if item == 2: + a = str(random.randint(1, 10)) + return "item_images/refrigerator/lodowka" + a + ".jpg" + if item == 3: + a = str(random.randint(1, 10)) + return "item_images/shelf/polka" + a + ".jpg"