예제 #1
0
        private static int AnnounceResult(NFLGame game, NFLResult result, int suWins, ref int suLosses, ref int atsWins,
                                          ref int atsTies, ref int atsLosses)
        {
            Utility.Announce(game.ScoreOut());
            var su = game.EvaluatePrediction(result);

            Utility.Announce(su);
            if (su.IndexOf("WIN") > -1)
            {
                suWins++;
            }
            else
            {
                suLosses++;
            }

            var ats = game.EvaluatePredictionAts(result, game.Spread);

            if (ats.IndexOf("WIN") > -1)
            {
                atsWins++;
            }
            else if (ats.IndexOf("PUSH") > -1)
            {
                atsTies++;
            }
            else
            {
                atsLosses++;
            }
            Utility.Announce(ats);
            return(suWins);
        }