Skip to content

Fix mobile host adding AI to network game#10639

Merged
tool4ever merged 1 commit into
Card-Forge:masterfrom
MostCromulent:mobile-network-host-add-ai
May 9, 2026
Merged

Fix mobile host adding AI to network game#10639
tool4ever merged 1 commit into
Card-Forge:masterfrom
MostCromulent:mobile-network-host-add-ai

Conversation

@MostCromulent
Copy link
Copy Markdown
Contributor

Summary

  • On mobile, the host of an online lobby could not convert OPEN slots to AI — the Human/AI toggle was repurposed as a Ready toggle in network mode, leaving no UI path to add AI players. Desktop has had this capability all along via separate Human/AI/Open radios + a Ready checkbox.
  • The underlying wiring to support host-added AI already existed — ServerGameLobby.mayControl permits the host to retype any non-REMOTE slot, and the lobby/protocol layers handle the type change end-to-end. The mobile side simply had no widget bound to that capability.
  • This change reuses mobile's existing humanAiSwitch widget with three modes: Human/AI (offline), Open/AI (network host on slots 1+), Not Ready/Ready (network slot 0 and remote slots). Mode is selected from (allowNetworking, index, mayControl, slot type).
  • Confined to forge-gui-mobile/PlayerPanel.java. No protocol/server/model changes.

🤖 Generated with Claude Code

The Human/AI toggle was repurposed as a Ready toggle in network mode,
leaving the host no way to fill an OPEN slot with an AI. Now slots 1+
that the host controls flip between OPEN and AI; slot 0 keeps the Ready
toggle, matching desktop's capability.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tool4ever tool4ever merged commit b2fda2e into Card-Forge:master May 9, 2026
2 checks passed
@MostCromulent MostCromulent deleted the mobile-network-host-add-ai branch May 9, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants