geekcomputers / geekcomputers/Python

Error with Blackjack_game

オープン
#676 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
35.4k
フォーク
12.9k
平均マージ
2時間 37分
マージ済み PR(30日)
1

説明

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:

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

blackjack.py の 89 行目付近の入力処理と、blackjack_rr.py の 184 行目付近の player_chips の初期化を調査してください。両方の blackjack の例を手動で実行し、hit/stay の入力が機能することと、プレイヤーのチップ合計がゲーム間で保持されることを確認してください。両方の報告された動作が、ゲームフローを変更せずに修正されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
game-dev
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。