def __init__(self):
        super().__init__()
        uic.loadUi("ui/single_loose.ui", self)
        communication.turn_toArduino("Lock")
        self.setLabel()

        self.btn_restart2.clicked.connect(self.restartClick)
        self.btn_menu2.clicked.connect(partial(changeScreen, self, 2))
    def finishBlue(self, value):
        self.setBlue(value)
        self.eye = value
        self.lb_blueturn.setText("파랑 플레이어 턴")

        if self.eye == 0:
            communication.turn_toArduino("Lock")
            self.timer = DiceThread(60)
            self.timer.finished.connect(partial(changeScreen, self, 15))
            self.timer.start()
        elif self.eye > 0:
            communication.count_turn = self.eye
            communication.turn_toArduino("Blue")
            self.serth.start()
    def finishRed(self, value):
        self.setRed(value)
        self.eye = value
        self.lb_redturn.setText("빨강 플레이어 턴")

        if self.eye == 0:
            communication.turn_toArduino("Lock")
            self.timer = DiceThread(60)
            self.timer.finished.connect(partial(changeScreen, self, 19))
            self.timer.start()
        elif self.eye > 0:
            communication.count_turn = self.eye
            communication.turn_toArduino("Red_")
            self.serth.start()
    def __init__(self):
        super().__init__()
        uic.loadUi("ui/single_start.ui", self)
        communication.turn_toArduino("Solo")

        self.reset()
        self.setLabel()

        self.qtimer = QTimer(self)
        self.qtimer.setInterval(1000)
        self.qtimer.timeout.connect(self.ticktock)

        self.serth = SerThread("single")
        self.serth.clickChanged.connect(self.buttonClicked)
        self.serth.start()

        # Popup Message
        self.lb_popup.setStyleSheet('image:url(res/warning.png);')
        self.lb_popup.setVisible(False)
        self.effect = DiceThread(2000, 0.005, 2000)
        self.effect.cntChanged.connect(self.warnPopup)
    def buttonClicked(self, value):
        self.filename = 'image:url(res/bluedice_'
        if self.eye == 1: self.filename += 'one'
        elif self.eye == 2: self.filename += 'two'
        elif self.eye == 3: self.filename += 'three'

        if value == 99:
            self.serth.stop()
            self.serth.exit()
            changeScreen(self, 24)
        elif value == -99:
            self.serth.stop()
            self.serth.exit()
            changeScreen(self, 23)
        else:
            self.filename += str(value) + '.png); border:0px;'
            self.btn_blueturn.setStyleSheet(self.filename)
            if value == 0:
                communication.turn_toArduino("Lock")
                self.timer = DiceThread(60)
                self.timer.finished.connect(self.checkBoom)
                self.timer.start()