Error with Blackjack_game
还没有人认领这个 Issue。
评估
调研方向
检查 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 分钟
- 30 天内合并 PR
- 1
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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 一周以上 新手友好度 10/100
geekcomputers/Python#3214 · 5 条评论 ·
-
Test of an Issue 未关闭
难度 5/5 一周以上 新手友好度 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