public async Task AddToGameGroup(string id, string connectionId) { await Groups.AddToGroupAsync(connectionId, id); var lobby = lobbiesService.GetLobbyById(id); lobby.SetReady(); await Clients.Client(connectionId).SendAsync("SetPlayerTurn", lobby.Turn); lobby.Turn = !lobby.Turn; if (lobby.IsReady) { await Clients.Group(id).SendAsync("ReadyNotify"); } }
public IActionResult Game(string Id) { return(View(lobbiesService.GetLobbyById(Id))); }