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]>
19 lines
499 B
C#
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);
|
|
}
|
|
}
|