SI_InteligentnyWozekWidlowy/data/Order.py

17 lines
450 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.ClientParams import ClientParams
2022-04-16 14:55:25 +02:00
from data.Item import Item
2022-05-09 15:49:11 +02:00
from data.enum.Priority import Priority
2022-03-24 20:43:53 +01:00
class Order:
2022-04-16 14:55:25 +02:00
id_counter = count(start=0)
2022-05-09 15:49:11 +02:00
def __init__(self, time: int, items: [Item], value: int, priority: Priority, client_params: ClientParams):
2022-04-16 14:55:25 +02:00
self.id = next(self.id_counter)
self.time = time
self.items = items
self.value = value
2022-05-09 15:49:11 +02:00
self.priority = priority