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

Method select_choice

BlackJack_game/blackjack_simulate.py:305–320  ·  view source on GitHub ↗
(self, pattern)

Source from the content-addressed store, hash-verified

303 )
304
305 def select_choice(self, pattern):
306 my_turn = "My turn now."
307 self.speak(content=my_turn)
308 operation = {
309 "I": "Insurance",
310 "H": "Hit",
311 "S": "Stand",
312 "D": "Double-down",
313 "U": "Surrender",
314 }
315 enu_choice = enumerate((operation.get(p) for p in pattern), 1)
316 dict_choice = dict(enu_choice)
317 for index, operator in dict_choice.items():
318 choice_fmt = "\t[{index}] {operation}"
319 print(choice_fmt.format(index=index, operation=operator))
320 return dict_choice
321
322
323class Recorder:

Callers 1

menuMethod · 0.80

Calls 2

speakMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected