SI_InteligentnyWozekWidlowy/data/Item.py
2022-04-16 14:55:25 +02:00

17 lines
347 B
Python

from itertools import count
from data.ItemType import ItemType
class Item:
id_counter = count(start=0)
def __init__(self, type: ItemType):
self.id = next(self.id_counter)
self.category = type
self.price = self.price_factory(type)
@staticmethod
def price_factory(self, type: ItemType):
return 1