#NEWLINE# def __init__( self , machine ) : #NEWLINE# #INDENT# self . machine = self #NEWLINE# self . log = logging . getLogger ( 'Mode Controller' ) #NEWLINE# self . debug = True #NEWLINE# self . queue = None #NEWLINE# self . active_modes = list ( ) #NEWLINE# self . mode_stop_count = 0 #NEWLINE# self . loader_methods = list ( ) #NEWLINE# self . start_methods = list ( ) #NEWLINE# if ( 'modes' in self . machine . config ) : #NEWLINE# #INDENT# self . machine . events . add_handler ( 'init_phase_4' , self . _load_modes ) #NEWLINE# #UNINDENT# self . machine . events . add_handler ( 'ball_ending' , self . _ball_ending , priority = 0 ) #NEWLINE# self . machine . events . add_handler ( 'ball_starting' , self . _ball_starting , priority = 0 ) #NEWLINE# self . machine . events . add_handler ( 'player_add_success' , self . _player_added , priority = 0 ) #NEWLINE# self . machine . events . add_handler ( 'player_turn_start' , self . _player_turn_start , priority = 1000000 ) #NEWLINE# self . machine . events . add_handler ( 'player_turn_stop' , self . _player_turn_stop , priority = 1000000 )