public static int AllowForInjuryRisk( NFLPlayer p, int proj ) { if ( p == null ) Utility.Announce("AllowForInjuryRisk:Null Player"); else { int nInjury; Int32.TryParse( p.Injuries(), out nInjury ); if ( nInjury > 0 ) { var injChance = ( ( nInjury * 10.0M ) / 100.0M ); var effectiveness = 1 - injChance; proj = (int) ( proj * effectiveness ); } } return proj; }
public static int AllowForInjuryRisk(NFLPlayer p, int proj) { if (p == null) { Utility.Announce("AllowForInjuryRisk:Null Player"); } else { Int32.TryParse(p.Injuries(), out int nInjury); if (nInjury > 0) { var injChance = ((nInjury * 10.0M) / 100.0M); var effectiveness = 1 - injChance; proj = ( int )(proj * effectiveness); } } return(proj); }
public static int AllowForInjuryRisk(NFLPlayer p, int proj) { #if DEBUG if (p == null) { Utility.Announce("AllowForInjuryRisk:Null Player"); } #endif var nInjury = 0; Int32.TryParse(p.Injuries(), out nInjury); if (nInjury > 0) { decimal injChance = ((nInjury * 10.0M) / 100.0M); decimal effectiveness = 1 - injChance; proj = (int)(proj * effectiveness); } return(proj); }
private DataRow PopulatePlayerRow( DataTable dt, NFLPlayer p, decimal totPoints) { var dr = dt.NewRow(); dr["Name"] = p.ProjectionLink(Season); dr["Pos"] = p.PlayerPos; dr["Role"] = p.RoleOut(); dr["RookieYr"] = p.RookieYear + "-" + p.Drafted; dr["CurrTeam"] = p.TeamCode; dr["FT"] = p.Owner; dr["Age"] = p.PlayerAge( noQuestionMark: true); if (LongStats) { dr["CurSCORES"] = p.CurrScores; dr["SCORES"] = p.Scores; dr["Avg"] = p.ScoresPerYear(); dr["INJURY"] = p.Injuries(); dr["Tdp"] = p.TotStats.Tdp; dr["YDp"] = p.TotStats.YDp; dr["Tdr"] = p.TotStats.Tdr; dr["TDc"] = p.TotStats.Tdc; dr["YDr"] = p.TotStats.YDr; dr["YDc"] = p.TotStats.YDc; dr["Fg"] = p.TotStats.Fg; } dr["Points"] = totPoints; dr["AgeRate"] = p.AgeRating(); dr["ADP"] = p.Adp; return(dr); }