public AvalonHelperModel(IAvalonGame game, IWebServerRequest request) { GameStatus = game.GetGameStatus(); UserStatus = game.GetUserStatus(request.User); Players = game.GetPlayerList(); CanStartGameMessage = game.CanStartGame(); Roles = game.GetRevealedRoles(); }
public AvalonHelperModel SelectRole(int roleId) { if (game.GetUserStatus(Request.User).RoleId == 0) { game.SelectRole(Request.User, roleId); } Request.ViewTemplateName = "Player"; return(Player()); }
public UserStatusModel GetUserStatus(IUser user) { return(baseGame.GetUserStatus(user)); }