def main(self): """ ゲーム全体(ポーカー + ダブルアップチャンス) """ can_play_game = True while can_play_game: # ゲームごとにplayer情報リセット player = Player() # 山札セット(セット数を決める) = ゲームごとに山札再構築 deck = stock.Deck() poker = Poker(deck, player) poker.main_game() # 役ありはダブルアップチャンス print(player.is_poker_win) if player.is_poker_win: bonus_game = DoubleUp(player) bonus_game.main_game() # ゲームリスタート restart_msg = "Qでゲーム終了、それ以外でゲームスタート:" start_res = input(restart_msg) if start_res == 'Q': can_play_game = False