GetResultsFor() private method

private GetResultsFor ( ComparisonDescription descr ) : StrategyComparisonResults
descr ComparisonDescription
return Dominion.Data.StrategyComparisonResults
Exemplo n.º 1
0
        public object GetResponse(WebService service)
        {
            StrategyComparisonResults comparisonResults = service.GetResultsFor(this);

            if (comparisonResults == null)
            {
                return(null);
            }

            var data = new List <object>();

            data.Add(new string[] { "Player", "Percent" });

            for (int index = 0; index < comparisonResults.winnerCount.Length; ++index)
            {
                data.Add(new object[] { comparisonResults.comparison.playerActions[index].name, comparisonResults.PlayerWinPercent(index) });
            }
            if (comparisonResults.tieCount > 0)
            {
                data.Add(new object[] { "Tie", comparisonResults.TiePercent });
            }

            var options = new Dictionary <string, object>();

            options.Add("title", "Game Breakdown");

            var result = new Dictionary <string, object>();

            result.Add("data", data);
            result.Add("options", options);
            result.Add("type", "pie");
            return(result);
        }
Exemplo n.º 2
0
        public string GetResponse(WebService service)
        {
            StrategyComparisonResults comparisonResults = service.GetResultsFor(this);
            var HtmlReportGenerator = new HtmlReportGenerator(comparisonResults);

            return(HtmlReportGenerator.CreateHtmlReport());
        }
Exemplo n.º 3
0
        public object GetResponse(WebService service)
        {
            StrategyComparisonResults comparisonResults = service.GetResultsFor(this);

            if (comparisonResults == null)
            {
                return null;
            }

            var data = new List<object>();
            data.Add(new string[] { "Player", "Percent" });

            for (int index = 0; index < comparisonResults.winnerCount.Length; ++index)
            {
                data.Add(new object[] { comparisonResults.comparison.playerActions[index].PlayerName, comparisonResults.PlayerWinPercent(index) });
            }
            if (comparisonResults.tieCount > 0)
            {
                data.Add(new object[] { "Tie", comparisonResults.TiePercent });
            }

            var options = new Dictionary<string, object>();
            options.Add("title", "Game Breakdown");

            var result = new Dictionary<string, object>();
            result.Add("data", data);
            result.Add("options", options);
            result.Add("type", "pie");
            return result;
        }
Exemplo n.º 4
0
        public object GetResponse(WebService service)
        {
            StrategyComparisonResults comparisonResults = service.GetResultsFor(this);

            return(GetLineGraphData(comparisonResults,
                                    "Probability player is ahead in points at end of round ",
                                    comparisonResults.statGatherer.oddsOfBeingAheadOnRoundEnd));
        }
        public object GetResponse(WebService service)
        {
            StrategyComparisonResults comparisonResults = service.GetResultsFor(this);

            return(GetLineGraphData(comparisonResults,
                                    "Coin To Spend Per Turn",
                                    comparisonResults.statGatherer.coinToSpend));
        }
Exemplo n.º 6
0
        public object GetResponse(WebService service)
        {
            StrategyComparisonResults comparisonResults = service.GetResultsFor(this);

            return(GetLineGraphData(comparisonResults,
                                    "Victory Point Total Per Turn",
                                    comparisonResults.statGatherer.victoryPointTotal));
        }
        public object GetResponse(WebService service)
        {
            StrategyComparisonResults comparisonResults = service.GetResultsFor(this);

            return GetLineGraphData(comparisonResults,
                "Victory Point Total Per Turn",
                comparisonResults.statGatherer.victoryPointTotal);
        }
        public object GetResponse(WebService service)
        {
            StrategyComparisonResults comparisonResults = service.GetResultsFor(this);

            return GetLineGraphData(comparisonResults,
                "Coin To Spend Per Turn",
                comparisonResults.statGatherer.coinToSpend);
        }
        public object GetResponse(WebService service)
        {
            StrategyComparisonResults comparisonResults = service.GetResultsFor(this);

            return GetLineGraphData(comparisonResults,
                "Probability player is ahead in points at end of round ",
                comparisonResults.statGatherer.oddsOfBeingAheadOnRoundEnd);
        }
Exemplo n.º 10
0
        public object GetResponse(WebService service)
        {
            StrategyComparisonResults comparisonResults = service.GetResultsFor(this);
            if (comparisonResults == null)
                return null;

            string result = comparisonResults.comparison.GetHumanReadableGameLog(gameNumber - 1);

            return result;
        }
Exemplo n.º 11
0
        public object GetResponse(WebService service)
        {
            StrategyComparisonResults comparisonResults = service.GetResultsFor(this);

            if (comparisonResults == null)
            {
                return(null);
            }

            string result = comparisonResults.comparison.GetHumanReadableGameLog(gameNumber - 1);

            return(result);
        }
Exemplo n.º 12
0
        public object GetResponse(WebService service)
        {
            StrategyComparisonResults comparisonResults = service.GetResultsFor(this);

            var options = GoogleChartsHelper.GetLineGraphOptions(
                "Point Spread",
                "Score",
                "Percentage",
                comparisonResults.pointSpreadHistogramData.GetXAxis(),
                comparisonResults.pointSpreadHistogramData.GetYAxis());

            return(options);
        }
Exemplo n.º 13
0
        public object GetResponse(WebService service)
        {
            StrategyComparisonResults comparisonResults = service.GetResultsFor(this);

            var options = GoogleChartsHelper.GetLineGraphOptions(
                "Point Spread",
                "Score",
                "Percentage",
                comparisonResults.pointSpreadHistogramData.GetXAxis(),
                comparisonResults.pointSpreadHistogramData.GetYAxis());

            return options;
        }
        public object GetResponse(WebService service)
        {
            StrategyComparisonResults comparisonResults = service.GetResultsFor(this);

            int maxTurn = comparisonResults.gameEndOnTurnHistogramData.GetXAxisValueCoveringUpTo(97);

            var options = GoogleChartsHelper.GetLineGraphOptions(
                "Probablity of Game Being over by turn",
                "Score",
                "Percentage",
                comparisonResults.gameEndOnTurnHistogramData.GetXAxis(maxTurn),
                comparisonResults.gameEndOnTurnHistogramData.GetYAxisIntegrated(maxTurn));

            return options;
        }
Exemplo n.º 15
0
        public object GetResponse(WebService service)
        {
            StrategyComparisonResults comparisonResults = service.GetResultsFor(this);

            int maxTurn = comparisonResults.gameEndOnTurnHistogramData.GetXAxisValueCoveringUpTo(97);

            var options = GoogleChartsHelper.GetLineGraphOptions(
                "Probability of Game Ending on Turn",
                "Score",
                "Percentage",
                comparisonResults.gameEndOnTurnHistogramData.GetXAxis(maxTurn),
                comparisonResults.gameEndOnTurnHistogramData.GetYAxis(maxTurn));

            return(options);
        }
 public string GetResponse(WebService service)
 {
     StrategyComparisonResults comparisonResults = service.GetResultsFor(this);
     var HtmlReportGenerator = new HtmlRenderer.HtmlReportGenerator(comparisonResults);
     return HtmlReportGenerator.CreateHtmlReport();
 }