def __init__(self, bus): self.bus = bus self.bus.subscribe_map({"start_competition": self.start_competition, "win_game": self.win_game, "cancel_competition": self.cancel_competition}, thread=True) self.current_game = 0 self.match = None self.backend = diskbackend registerMenu(self.get_menu_entries)
def __init__(self, bus): self.bus = bus self.bus.subscribe_map( { "start_competition": self.start_competition, "win_game": self.win_game, "cancel_competition": self.cancel_competition }, thread=True) self.current_game = 0 self.match = None self.backend = diskbackend registerMenu(self.get_menu_entries)
def __init__(self, bus): self.bus = bus self.bus.subscribe(self.process_event, thread=True) self.game_win_score = None self.check_win_time = None self.check_delay = 2 self.current_score = {} self.party_timeout = None self.game_end_time = None self.timeout_close_time = None self.sudden_death = False self.timeout_close_secs = 15 self.modes = [(None, None), (3, None), (5, None), (3, 120), (3, 180)] # Turn off party mode after this time in sudden death self.party_mode_auto_off = 600 registerMenu(self.getMenuEntries) Thread(target=self.__run, daemon=True).start()