Added Backend Classes and FUnctions for an working Game. But lacking Implementations

This commit is contained in:
jhim
2026-02-27 11:16:21 +01:00
committed by Jonas
parent 120c671dce
commit 5db7ac1676
12 changed files with 183 additions and 15 deletions
+21
View File
@@ -0,0 +1,21 @@
using Microsoft.AspNetCore.SignalR;
namespace API.Controllers;
public class GameHubSocket : Hub
{
public async Task CreateGame(string playerName, )
{
await Groups.AddToGroupAsync(Context.ConnectionId, gameId);
await Clients.Group(gameId).SendAsync("PlayerJoined", new
{
ConnectionId = Context.ConnectionId,
PlayerName = playerName
});
}
public async Task JoinGame(string gameId, string playerName)
{
}
}