feat: honest AI opponent in quick game #68
Reference in New Issue
Block a user
Delete Branch "feature/ai-opponent"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds an explicit 🤖 AI / 👤 Random player choice to New Game's quick game (AI the default). The random path (disguised robot) is unchanged; AI is a robot the player knowingly plays.
Behaviour (vs_ai)
turn_timeout_secs = AIInactivityTimeout); only the human is ever on the clock.games.vs_ai, set only on AI games, so the disguised path is never revealed (UI derives 🤖/gates from the flag, never the account).Matchmaker.StartVsAIseats the robot directly (never the open pool).Wire:
vs_aionEnqueueRequest+GameView(FB regen Go+TS), through DTO/transcode/pkg.wire/notify.Schema/wire change → contour DB wipe needed after merge (
DROP SCHEMA backend CASCADE+ restart; I'll handle it).Tests: Go build/vet/gofmt; backend unit; integration on real Postgres (new
ai_game_test.go: seated+active+vs_ai+7-day clock, immediate move, stats skipped, 7-day timeout→human loss, chat/nudge rejected); pkg/gateway; UI check + unit (243) + build + bundle gate + e2e (138, incl. a new AI test; quick-match e2e updated to pick Random player).Bakes back into ARCHITECTURE / FUNCTIONAL(+_ru) / UI_DESIGN / PRERELEASE / backend README.