Skip to content

fix(p2p): fix infinite loop and add AI turn visibility#14

Merged
edge2992 merged 2 commits into
mainfrom
fix/p2p-and-ai-visibility-12-13
Mar 22, 2026
Merged

fix(p2p): fix infinite loop and add AI turn visibility#14
edge2992 merged 2 commits into
mainfrom
fix/p2p-and-ai-visibility-12-13

Conversation

@edge2992

Copy link
Copy Markdown
Owner

Summary

  • fix(engine): runAITurns() が P2P モードで無限ループに陥るバグを修正。リモート人間プレイヤーが AI でもローカルプレイヤーでもない場合にループを抜けるようにした。
  • feat(cli): ローカルモードで AI ターンのダイスの出目・選択カテゴリ・スコアを表示。1秒の自動進行またはキー押下で次へ進む。

Test plan

  • go build ./... 通過
  • go test ./... 全テスト通過
  • P2P モードで host/join して、ホストがスコア選択後にゲストの画面が正常に更新されることを確認
  • ローカルモードで AI ターンのダイスとスコアが表示されることを確認

Fixes #12
Fixes #13

…g AI

Fixes infinite loop in P2P mode where the guest (a remote human player)
is neither the local player nor an AI, causing runAITurns to loop forever.

Fixes #12
Shows each AI player's dice roll and scoring decision briefly before
returning control to the human player. Auto-advances after 1 second
or on any key press.

Fixes #13
@edge2992 edge2992 merged commit e8b26d8 into main Mar 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant