Files
4Gewinnt/API/Controllers/GameHubSocket.cs
T
jonas b967bd70eb Refactor and clean up codebase:
- Introduced `IGameRepository` interface and its implementation.
- Transitioned namespaces to `file-scoped` for consistency.
- Simplified class definitions, e.g., `Game` and `SixDigitInt`.
- Restructured `GameField` logic for improved readability and functionality.
- Fixed formatting issues in `API.csproj` and added a `using` directive in `Program.cs`.
2026-03-12 23:20:05 +01:00

21 lines
498 B
C#

using Microsoft.AspNetCore.SignalR;
namespace API.Controllers;
public class GameHubSocket : Hub
{
public async Task CreateGame(string playerName)
{
// TODO: create
await Groups.AddToGroupAsync(Context.ConnectionId, "gameId");
await Clients.Group("gameId").SendAsync("PlayerJoined", new
{
Context.ConnectionId,
PlayerName = playerName
});
}
public async Task JoinGame(string gameId, string playerName)
{
}
}