from src.displays.Display import Display

class SpecialDisplay(Display):
    def __init__(self, name):
        super(name)
        self.credits = 0
        self.gameTimeBonus = 0
        self.ballsToPlay = 0

    def write_score(self):
        super.write_score(int(str(self.credits).zfill(2)
                              + str(self.gameTimeBonus).zfill(2)
                              + str(self.ballsToPlay).zfill(2)))

    def write_ballsToPlay(self, ballsToPlay):
        self.ballsToPlay = ballsToPlay
        self.write_score()

    def write_gameTimeBonus(self, gameTimeBonus):
        self.gameTimeBonus = gameTimeBonus
        self.write_score()

    def write_credits(self, credits):
        self.credits = credits
        self.write_score()
