private static void AuditPrediction(NFLGame game, int awayDef, int awayOff, int homeOff, NFLResult res, int homeDef) { const string debugTeamCode = "GB"; var debugTeamRank = "(0-0)"; var strVenue = "unknown"; var oppTeamCode = "YY"; var oppRank = "(0-0)"; const string rankFormat = "({0}.{1}={2})"; var bAudit = false; if (game.HomeTeam.Equals(debugTeamCode)) { bAudit = true; strVenue = "Home"; oppTeamCode = game.AwayTeam; oppRank = string.Format(rankFormat, awayOff, awayDef, Rating(awayOff, awayDef)); debugTeamRank = string.Format(rankFormat, homeOff, homeDef, Rating(homeOff, homeDef)); } if (game.AwayTeam.Equals(debugTeamCode)) { bAudit = true; strVenue = "Away"; oppTeamCode = game.HomeTeam; oppRank = string.Format(rankFormat, homeOff, homeDef, Rating(homeOff, homeDef)); debugTeamRank = string.Format(rankFormat, awayOff, awayDef, Rating(awayOff, awayDef)); } if (!bAudit) { return; } Utility.Announce(string.Format(" {5} Debug Team {0} {1}, is {2} vs {3} {4}", debugTeamCode, debugTeamRank, strVenue, oppTeamCode, oppRank, game.GameCodeOut())); Utility.Announce(res.LogResult()); }
private void AuditIt( NFLGame game, NFLResult res, int homeRating, int awayRating) { const string debugTeamCode = "SF"; var debugTeamRank = "(0-0)"; #if DEBUG var strVenue = "unknown"; #endif var oppTeamCode = "YY"; var oppRank = "(0-0)"; const string rankFormat = "({0})"; var bAudit = false; if (game.HomeTeam.Equals(debugTeamCode)) { bAudit = true; #if DEBUG strVenue = "Home"; #endif oppTeamCode = game.AwayTeam; oppRank = string.Format(rankFormat, awayRating); debugTeamRank = string.Format(rankFormat, homeRating); } if (game.AwayTeam.Equals(debugTeamCode)) { bAudit = true; #if DEBUG strVenue = "Away"; #endif oppTeamCode = game.HomeTeam; oppRank = string.Format(rankFormat, homeRating); debugTeamRank = string.Format(rankFormat, awayRating); } if (!bAudit) { return; } #if DEBUG Announce( $" {game.GameCodeOut()} Debug Team {debugTeamCode} {debugTeamRank}, is {strVenue} vs {oppTeamCode} {oppRank}"); Announce( res.LogResult()); // verbosity #endif }
public NFLResult PredictGame(NFLGame game, IStorePredictions persistor, DateTime predictionDate) { var result = new NFLResult {AwayTeam = game.AwayTeam, HomeTeam = game.HomeTeam}; var homeTeam = game.HomeNflTeam; var awayTeam = game.AwayNflTeam; var nHomeOff = Utility.OffRating(homeTeam, predictionDate); var nAwayOff = Utility.OffRating(awayTeam, predictionDate); var nHomeDef = Utility.DefRating(homeTeam, predictionDate); var nAwayDef = Utility.DefRating(awayTeam, predictionDate); result.HomeScore = (nHomeOff + nAwayDef) - 20; result.AwayScore = (nAwayOff + nHomeDef) - 20; persistor.StorePrediction("Miller", game, result); if (AuditTrail) Utility.Announce(string.Format("{0}-{1}:{2}", game.GameCodeOut(), game.GameCode, result.LogResult())); return result; }
private static void AuditIt(NFLGame game, NFLResult res, int homeRating, int awayRating) { const string debugTeamCode = "SF"; var debugTeamRank = "(0-0)"; var strVenue = "unknown"; var oppTeamCode = "YY"; var oppRank = "(0-0)"; const string rankFormat = "({0})"; var bAudit = false; if (game.HomeTeam.Equals(debugTeamCode)) { bAudit = true; strVenue = "Home"; oppTeamCode = game.AwayTeam; oppRank = string.Format(rankFormat, awayRating); debugTeamRank = string.Format(rankFormat, homeRating); } if (game.AwayTeam.Equals(debugTeamCode)) { bAudit = true; strVenue = "Away"; oppTeamCode = game.HomeTeam; oppRank = string.Format(rankFormat, homeRating); debugTeamRank = string.Format(rankFormat, awayRating); } if (!bAudit) { return; } #if DEBUG Utility.Announce(string.Format(" {5} Debug Team {0} {1}, is {2} vs {3} {4}", debugTeamCode, debugTeamRank, strVenue, oppTeamCode, oppRank, game.GameCodeOut())); Utility.Announce(res.LogResult()); // verbosity #endif }
public NFLResult PredictGame(NFLGame game, IStorePredictions persistor, DateTime predictionDate) { var result = new NFLResult { AwayTeam = game.AwayTeam, HomeTeam = game.HomeTeam }; var homeTeam = game.HomeNflTeam; var awayTeam = game.AwayNflTeam; var nHomeOff = Utility.OffRating(homeTeam, predictionDate); var nAwayOff = Utility.OffRating(awayTeam, predictionDate); var nHomeDef = Utility.DefRating(homeTeam, predictionDate); var nAwayDef = Utility.DefRating(awayTeam, predictionDate); result.HomeScore = (nHomeOff + nAwayDef) - 20; result.AwayScore = (nAwayOff + nHomeDef) - 20; persistor.StorePrediction("Miller", game, result); if (AuditTrail) { Utility.Announce(string.Format("{0}-{1}:{2}", game.GameCodeOut(), game.GameCode, result.LogResult())); } return(result); }
private static void AuditIt( NFLGame game, NFLResult res, int homeRating, int awayRating ) { const string debugTeamCode = "SF"; var debugTeamRank = "(0-0)"; #if DEBUG var strVenue = "unknown"; #endif var oppTeamCode = "YY"; var oppRank = "(0-0)"; const string rankFormat = "({0})"; var bAudit = false; if (game.HomeTeam.Equals(debugTeamCode)) { bAudit = true; #if DEBUG strVenue = "Home"; #endif oppTeamCode = game.AwayTeam; oppRank = string.Format(rankFormat, awayRating ); debugTeamRank = string.Format(rankFormat, homeRating ); } if (game.AwayTeam.Equals(debugTeamCode)) { bAudit = true; #if DEBUG strVenue = "Away"; #endif oppTeamCode = game.HomeTeam; oppRank = string.Format(rankFormat, homeRating ); debugTeamRank = string.Format( rankFormat, awayRating ); } if (!bAudit) return; #if DEBUG Utility.Announce(string.Format(" {5} Debug Team {0} {1}, is {2} vs {3} {4}", debugTeamCode, debugTeamRank, strVenue, oppTeamCode, oppRank, game.GameCodeOut())); Utility.Announce(res.LogResult()); // verbosity #endif }
private static void AuditPrediction(NFLGame game, int awayDef, int awayOff, int homeOff, NFLResult res, int homeDef) { const string debugTeamCode = "GB"; var debugTeamRank = "(0-0)"; var strVenue = "unknown"; var oppTeamCode = "YY"; var oppRank = "(0-0)"; const string rankFormat = "({0}.{1}={2})"; var bAudit = false; if (game.HomeTeam.Equals(debugTeamCode)) { bAudit = true; strVenue = "Home"; oppTeamCode = game.AwayTeam; oppRank = string.Format(rankFormat, awayOff, awayDef, Rating(awayOff, awayDef)); debugTeamRank = string.Format(rankFormat, homeOff, homeDef, Rating(homeOff, homeDef)); } if (game.AwayTeam.Equals(debugTeamCode)) { bAudit = true; strVenue = "Away"; oppTeamCode = game.HomeTeam; oppRank = string.Format(rankFormat, homeOff, homeDef, Rating(homeOff, homeDef)); debugTeamRank = string.Format(rankFormat, awayOff, awayDef, Rating(awayOff, awayDef)); } if (!bAudit) return; Utility.Announce(string.Format(" {5} Debug Team {0} {1}, is {2} vs {3} {4}", debugTeamCode, debugTeamRank, strVenue, oppTeamCode, oppRank, game.GameCodeOut())); Utility.Announce(res.LogResult()); }