""" """ HISTORY_DEPTH = 8 class SchedulerBrutal: def __init__(self, cards: dict, state: dict): self._cards = cards self._state = {} # Synchronise state with current card collection for id, card in self._cards.items(): history = state.get(id, [None] * HISTORY_DEPTH) # adjust history if depth has changed if len(history) > HISTORY_DEPTH: history = history[-HISTORY_DEPTH:] elif len(history) < HISTORY_DEPTH: history = ([None] * (HISTORY_DEPTH - len(history))) + history self._state[id] = history def practice(self, size: int) -> dict: pass def test(self, size: int) -> dict: pass def update(self, results: dict) -> None: pass def getState(self) -> dict: return self._state