SI_InteligentnyWozekWidlowy/util/AgentIdFactory.py

10 lines
190 B
Python
Raw Normal View History

2022-04-16 14:55:25 +02:00
from itertools import count
class AgentIdFactory(object):
_id_counter = count(start=0)
@staticmethod
def get_next_id() -> int:
return next(AgentIdFactory._id_counter)