# Path: utility.py
# def boolean_format(value):
#         if value=='Yes':
#             return True
#         else:
#             return False


import sys
import procgame
import pinproc
import string
import time
import datetime
import locale
import math
import copy
import yaml
import os
import logging
import audits
import diagnostics
from utility import boolean_format
from ac_relay import *
from switched_coils import *
from scoredisplay.alphanumeric import *
from scoredisplay.scoredisplay import *
from effects import *
from extra_ball import *
from service import *
from attract import *
from base import *
from moonlight import *
from match import *
from tilt import *
from trough import *
from procgame import *
from player import *
from threading import Thread
from time import strftime
                    from scoredisplay.desktop import Desktop
        from colorlogging import ColorizingStreamHandler
                self.balls_per_game = self.user_settings['Standard']['Balls Per Game']
                #moonlight setup
                self.moonlight_minutes = self.user_settings['Feature']['Moonlight Mins to Midnight']
                self.moonlight_flag = False

		self.setup_ball_search()
                #self.score_display.set_left_players_justify(self.user_settings['Display']['Left side score justify'])


		# Note - Game specific item:
		# The last parameter should be the name of the game's ball save lamp
		self.ball_save = procgame.modes.BallSave(self, self.lamps.shootAgain,'shooterLane' )

		trough_switchnames = []
		# Note - Game specific item:
		# This range should include the number of trough switches for
		# the specific game being run.  In range(1,x), x = last number + 1.
		for i in range(1,4):
			trough_switchnames.append('trough' + str(i))
		early_save_switchnames = ['rightOutlane', 'leftOutlane']

		#setup trough
                self.trough = Trough(game=self,drain_callback=self.drain_callback)

		# Link ball_save to trough
		self.trough.ball_save_callback = self.ball_save.launch_callback
		self.trough.num_balls_to_save = self.ball_save.get_num_balls_to_save
		self.ball_save.trough_enable_ball_save = self.trough.enable_ball_save

                #setup auto launcher

# Path: utility.py
# def boolean_format(value):
#         if value=='Yes':
#             return True
#         else:
#             return False


# Path: game.py
import sys
import procgame
import pinproc
import string
import time
import datetime
import locale
import math
import copy
import yaml
import os
import logging
import audits
import diagnostics
from utility import boolean_format
from ac_relay import *
from switched_coils import *
from scoredisplay.alphanumeric import *
from scoredisplay.scoredisplay import *
from effects import *
from extra_ball import *
from service import *
from attract import *
from base import *
from moonlight import *
from match import *
from tilt import *
from trough import *
from procgame import *
from player import *
from threading import Thread
from time import strftime
                    from scoredisplay.desktop import Desktop
        from colorlogging import ColorizingStreamHandler

                self.balls_per_game = self.user_settings['Standard']['Balls Per Game']
                #moonlight setup
                self.moonlight_minutes = self.user_settings['Feature']['Moonlight Mins to Midnight']
                self.moonlight_flag = False

		self.setup_ball_search()
                #self.score_display.set_left_players_justify(self.user_settings['Display']['Left side score justify'])


		# Note - Game specific item:
		# The last parameter should be the name of the game's ball save lamp
		self.ball_save = procgame.modes.BallSave(self, self.lamps.shootAgain,'shooterLane' )

		trough_switchnames = []
		# Note - Game specific item:
		# This range should include the number of trough switches for
		# the specific game being run.  In range(1,x), x = last number + 1.
		for i in range(1,4):
			trough_switchnames.append('trough' + str(i))
		early_save_switchnames = ['rightOutlane', 'leftOutlane']

		#setup trough
                self.trough = Trough(game=self,drain_callback=self.drain_callback)

		# Link ball_save to trough
		self.trough.ball_save_callback = self.ball_save.launch_callback
		self.trough.num_balls_to_save = self.ball_save.get_num_balls_to_save
		self.ball_save.trough_enable_ball_save = self.trough.enable_ball_save

                #setup auto launcher

                self.auto_launch_enabled = boolean_format(self.user_settings['Feature']['Auto Launcher Installed'])