Error with Blackjack_game
まだ誰も着手していません。
評価
調査の方向性
blackjack.py の 89 行目付近の入力処理と、blackjack_rr.py の 184 行目付近の player_chips の初期化を調査してください。両方の blackjack の例を手動で実行し、hit/stay の入力が機能することと、プレイヤーのチップ合計がゲーム間で保持されることを確認してください。両方の報告された動作が、ゲームフローを変更せずに修正されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
blackjack.py:
On line 89, the datatype for the user input is a string which doesn't match up with the datatype for the if statement condition on line 90. Since the else statement is automatically executed, the player stays even if wanting to play their hand. A quick fix would be to change line 89 to:
k = int(input('Want to hit or stay?\n Press 1 for hit and 0 for stay '))
blackjack_rr.py:
The total amount of chips the player has doesn't carry over to the next game. A quick fix would be to move line 184 to right before the while statement:
#GAMEPLAY
player_chips = Chips()
while True:
- 主要言語
- Python
- スター
- 35.4k
- フォーク
- 12.9k
- 平均マージ
- 2時間 37分
- マージ済み PR(30日)
- 1
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
geekcomputers/Python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
geekcomputers/Python#3205 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
geekcomputers/Python#3188 · コメント 3 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
geekcomputers/Python#3060 · コメント 1 件 ·
-
[BUG] shapchat オープン
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
geekcomputers/Python#3214 · コメント 5 件 ·
-
Test of an Issue オープン
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
geekcomputers/Python#3209 · コメント 5 件 ·
geekcomputers/Python の issue をすべて見る
似ている issue
-
area/auth bug comp/agent P3 platform/discord type/security
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
NousResearch/hermes-agent#117848 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
bancolombia/sentinel#23 ·
-
test md オープンCI
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
langchain-ai/deepagents#6450 ·
-
bug client
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100