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

Method chips_manage

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

Source from the content-addressed store, hash-verified

525 return select
526
527 def chips_manage(self):
528 if self.choice == "Insurance":
529 err = "The amount should under " + str(self.player.chips.current_amount())
530 pay_ins = self.get_select(
531 self.player.chips.current_amount(),
532 prompt="Insurance amount >> ",
533 general_err=err,
534 )
535 self.player.chips.insurance = pay_ins
536
537 if self.choice == "Double-down":
538 try:
539 self.player.chips.double_bet()
540 except ValueError as e:
541 print(e)
542 self.player.refresh_prompt()
543 if self.choice in ("Insurance", "Double-down", "Surrender"):
544 self.go_on = False
545
546 def card_manage(self):
547 if self.choice in ("Hit", "Double-down"):

Callers 1

playMethod · 0.95

Calls 4

get_selectMethod · 0.95
current_amountMethod · 0.80
double_betMethod · 0.80
refresh_promptMethod · 0.80

Tested by

no test coverage detected