SI_InteligentnyWozekWidlowy/data/Item.py

16 lines
389 B
Python
Raw Normal View History

2022-04-16 14:55:25 +02:00
from itertools import count
2022-05-09 15:49:11 +02:00
from data.enum.ItemType import ItemType
2022-03-24 20:43:53 +01:00
class Item:
2022-04-16 14:55:25 +02:00
id_counter = count(start=0)
2022-05-22 16:27:36 +02:00
def __init__(self, item_type: ItemType):
2022-04-16 14:55:25 +02:00
self.id = next(self.id_counter)
2022-05-22 16:27:36 +02:00
self.real_type = item_type
self.guessed_type = None
2022-04-16 14:55:25 +02:00
2022-05-22 16:27:36 +02:00
def __repr__(self) -> str:
return "|real: {} -- guessed: {}| \n".format(self.real_type, self.guessed_type)