public static string ActionToString(UCGameplayAction action, TeamGameplayModel teamModel) { UCPlayer player = action.PlayerId > 0 ? teamModel.Players.SingleOrDefault(i => i.Id == action.PlayerId) : null; return(string.Format("Q{5} <strong>{0}</strong> {1} ({2})... {3}-{4}", action.GameTime.ToString("mm:ss"), GameAction.GetAction(action.ActionCode).Text, player == null ? "" : string.Format("{0} {1}. {2}", player.PlayerNumber, player.FirstName.Substring(0, 1), player.LastName), action.TeamScore1, action.TeamScore2, action.Quarter )); }
public PlayerGameplayModel(TeamGameplayModel teamModel, UCPlayer player) { TeamModel = teamModel; PlayerId = player.Id; }