Files
JoshHeaps.Net/JoshHeaps.Net/Hubs/ChessHub.cs
T
Josh-HeapsandClaude Opus 4.8 e8a3bfe432 Push authoritative game state on every move
The move endpoint now returns the full resulting board state, and the
controller and CPU orchestrator broadcast it (plus captured pieces and a
ply version) over SignalR, so clients render from one payload instead of
re-fetching. Removes the client-driven hub relay.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-10 16:58:11 -06:00

19 lines
499 B
C#

using Microsoft.AspNetCore.SignalR;
namespace JoshHeaps.Net.Hubs;
public class ChessHub : Hub
{
public async Task JoinWebsocketGroup(string gameId)
{
Console.WriteLine($"🔌 Joining group {gameId}");
await Groups.AddToGroupAsync(Context.ConnectionId, gameId);
}
public async Task LeaveWebsocketGroup(string gameId)
{
Console.WriteLine($"❌ Leaving group {gameId}");
await Groups.RemoveFromGroupAsync(Context.ConnectionId, gameId);
}
}