public async Task ResultsShown(Guid session) { if (!CoreManager.GetSession(session).AllDrawsShown()) { await DrawPhaseLogic(session); } else { if (!CoreManager.IsEndOfSession(session)) { CoreManager.ResetRounDone(session); CoreManager.CleanDraws(session); await Clients.Clients(CoreManager.GetContextPlayerConnectionId(session)).SendAsync("NextRound"); CoreManager.IncrementAllPlayersInteraction(session); await Clients.Client(CoreManager.GetSession(session).UiClientConnection).SendAsync("NextRound", 5); } else { await Clients.All.SendAsync("EndOfGame"); CoreManager.IncrementAllPlayersInteraction(session); } } }
public async Task NextGamePhase(Guid session) { await Clients.Clients(CoreManager.GetContextPlayerConnectionId(session)).SendAsync("SeeResults"); CoreManager.IncrementAllPlayersInteraction(session); await Clients.Client(CoreManager.GetSession(session).UiClientConnection).SendAsync("SeeResults", CoreManager.GetSession(session).GetPlayersScores()); }
public async Task RoundEndedAck(Guid session) { CoreManager.ResetRounDone(session); await Clients.Clients(CoreManager.GetContextPlayerConnectionId(session)).SendAsync("DrawThemes", CoreManager.GetSession(session).GetThemes()); CoreManager.IncrementAllPlayersInteraction(session); await Clients.Client(CoreManager.GetSession(session).UiClientConnection).SendAsync("DrawThemes", 60); }
public async Task Ready(Context context) { CoreManager.IncrementPlayerInteraction(context); CoreManager.StartSession(context.Session); var playerConnections = CoreManager.GetContextPlayerConnectionId(context); await Clients.Clients(playerConnections).SendAsync("DrawThemes", CoreManager.GetSession(context.Session).GetThemes()); CoreManager.IncrementAllPlayersInteraction(context); await Clients.Client(CoreManager.GetSession(context.Session).UiClientConnection).SendAsync("DrawThemes", 60); }
public async Task SetTimesUp(Guid session) { await Clients.Clients(CoreManager.GetContextPlayerConnectionId(session)).SendAsync("TimesUp"); CoreManager.IncrementAllPlayersInteraction(session); }