public string EndRoundHandler(int Game_Id, string Vote_Ids) { var game = HttpContext.Application["Game-" + Game_Id] as GameModel; game.Vote_Ids = Vote_Ids; var result = PhaseMethods.EndRound(game, HttpContext); PhaseMethods.BeginPhase1(game, HttpContext); return(result); //var hubContext = Microsoft.AspNet.SignalR.GlobalHost.ConnectionManager.GetHubContext<GameHub>().Clients.All; //hubContext.Redirect("/Game/"); }
public void BeginPhase2Handler(int Game_Id) { var game = HttpContext.Application["Game-" + Game_Id] as GameModel; // If no illegal actions have happened then move to the next round if (PhaseMethods.BeginPhase2(game, HttpContext) == 0) { // End the current round PhaseMethods.EndRound(game, HttpContext); // Begin the next round PhaseMethods.BeginPhase1(game, HttpContext); } }