refactor: move AI match creation to admin-only Blazor page
Removes game.ai.create_match WebSocket handler (no longer accessible to clients) and replaces it with AiMatchService injected directly into a new admin Blazor page at /ai/matches. Admin portal gains NATS publish capability (SOR.Networking.Nats project reference + AddNats) so AiMatchService can emit GameStartedEvent to trigger AiPlayerSessionManager. AiDeckResolver is made public for admin injection. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -4,19 +4,6 @@ namespace SOR.Game;
|
||||
|
||||
/// <summary>Host adds an AI player to a custom lobby.</summary>
|
||||
public sealed record GameAddAiRequest(Guid LobbyId, int Difficulty, string Strategy);
|
||||
|
||||
/// <summary>Create a spectatable AI-vs-AI match.</summary>
|
||||
public sealed record GameAiMatchRequest(
|
||||
int Difficulty1,
|
||||
string Strategy1,
|
||||
int Difficulty2,
|
||||
string Strategy2);
|
||||
|
||||
/// <summary>Response after creating an AI-vs-AI match. Client sends game.spectate to watch.</summary>
|
||||
public sealed record GameAiMatchResponse(
|
||||
Guid SessionId,
|
||||
string Player1Name,
|
||||
string Player2Name);
|
||||
public sealed record GameAddAiResponse(Guid AiAccountId, string AiDisplayName, int SeatIndex);
|
||||
|
||||
/// <summary>Host removes an AI player from a custom lobby.</summary>
|
||||
|
||||
Reference in New Issue
Block a user