MCPcopy Index your code
hub / github.com/geekcomputers/Python / result_exhibit

Method result_exhibit

BlackJack_game/blackjack_simulate.py:609–624  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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
627def main():

Callers 1

playMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected