def get_disagree_button(self): while self.regret_time >= 0: if len(self.regret_click_button) == 2: self.regret_click_button.remove(self.disagree_button) self.list_button.remove(self.disagree_button) self.disagree_button = ClickButton( self.__screen, 200, 450, "Disagree(%d)" % self.regret_time, (255, 182, 221)) self.list_button.append(self.disagree_button) self.regret_click_button.append(self.disagree_button) self.regret_time -= 1 sleep(1)
def get_opponent_regret_button(self): self.opponent_regret_button = RegretBoard(self.__screen, "opponent asks for regret", 200, 50) self.list_button.append(self.opponent_regret_button) self.agree_button = ClickButton(self.__screen, 350, 450, "Agree", (0, 255, 255)) self.regret_click_button.append(self.agree_button) self.list_button.append(self.agree_button) self.get_disagree_button() self.regret_click_button.clear() self.list_button.remove(self.disagree_button) self.list_button.remove(self.agree_button) self.list_button.remove(self.opponent_regret_button) self.regret_time = 8
def get_cannot_click_regret_button(self): self.cannot_click_regret_button = ClickButton(self.__screen, 90, 720, "Regret", (128, 128, 128))
def get_regret_button(self): self.regret_button = ClickButton(self.__screen, 90, 720, "Regret %d" % self.own_regret_count, (255, 136, 20))
def get_give_up_button(self): self.give_up_button = ClickButton(self.__screen, 90, 760, "Give up", (128, 128, 128))
def get_start_button(self): self.screen_rect = self.__screen.get_rect() self.start_button = ClickButton(self.__screen, self.screen_rect.centerx, self.screen_rect.centery - 5, "Start")
def get_quit_button(self): self.quit_button = ClickButton(self.__screen, 90, 760, "Quit", (128, 128, 128))