Add chess (Oh my gosh big commit)

This commit is contained in:
jheaps
2025-03-27 13:54:07 -06:00
parent 2edc40fb99
commit fbed5ae789
41 changed files with 1943 additions and 71 deletions
+18
View File
@@ -0,0 +1,18 @@
using JoshHeaps.Net.Models;
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 MoveMade(string gameId, MoveResultDto moveResult)
{
await Clients.OthersInGroup(gameId).SendAsync("ReceiveMoveUpdate", gameId, moveResult);
}
}