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`.
This commit is contained in:
@@ -4,18 +4,18 @@ namespace API.Controllers;
|
||||
|
||||
public class GameHubSocket : Hub
|
||||
{
|
||||
public async Task CreateGame(string playerName, )
|
||||
public async Task CreateGame(string playerName)
|
||||
{
|
||||
await Groups.AddToGroupAsync(Context.ConnectionId, gameId);
|
||||
await Clients.Group(gameId).SendAsync("PlayerJoined", new
|
||||
// TODO: create
|
||||
await Groups.AddToGroupAsync(Context.ConnectionId, "gameId");
|
||||
await Clients.Group("gameId").SendAsync("PlayerJoined", new
|
||||
{
|
||||
ConnectionId = Context.ConnectionId,
|
||||
Context.ConnectionId,
|
||||
PlayerName = playerName
|
||||
});
|
||||
}
|
||||
|
||||
public async Task JoinGame(string gameId, string playerName)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -11,4 +11,4 @@ public class StatusController : ControllerBase
|
||||
{
|
||||
return Ok("Running");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user