| 607 | ) |
| 608 | |
| 609 | def result_exhibit(self): |
| 610 | def get_color(): |
| 611 | if "BUST" in content: |
| 612 | return COLOR.get("RED" if "Player" in content else "GREEN") |
| 613 | if self.winner == "Player": |
| 614 | return COLOR.get("GREEN") |
| 615 | elif self.winner == "Dealer": |
| 616 | return COLOR.get("RED") |
| 617 | else: |
| 618 | return COLOR.get("YELLOW") |
| 619 | |
| 620 | end = COLOR.get("END") |
| 621 | content = str(self.res) |
| 622 | color = get_color() |
| 623 | winner_fmt = color + "\n\t>> {content} <<\n" + end |
| 624 | print(winner_fmt.format(content=content)) |
| 625 | |
| 626 | |
| 627 | def main(): |