Ejemplo n.º 1
0
        public PlaytestResultsDetailsGUI(PlaytestResults testResults)
        {
            this.playtestResults = testResults;
            Text = "Playtest all results";

            FormBorderStyle = FormBorderStyle.FixedDialog;
            MaximizeBox     = false;
            MinimizeBox     = false;

            Size = new Size(450, 600);

            AutoScroll = true;

            InitializeComponent();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Runs a playtest using the specified agent.
        /// </summary>
        /// <param name="savedAgent"></param>
        /// <param name="simulationCount">The number of playtests</param>
        /// <returns></returns>
        public PlaytestResults RunPlaytest(SavedAgent savedAgent, int simulationCount)
        {
            List <PlaytestResult> testResults = new List <PlaytestResult>();

            ShowProgressBar();

            for (int i = 0; i < simulationCount; i++)
            {
                testResults.Add(playTestSimulator.RunSimulation(savedAgent, testType, true));

                progressBar.Maximum = simulationCount + 1;
                progressBar.Value   = simulationCount + 1;
                progressBar.Maximum = simulationCount;
                progressBar.Value   = i;
                progressBar.Refresh();
                progressForm.Refresh();
            }

            PlaytestResults playtestResults = new PlaytestResults(testResults);

            progressForm.Close();

            return(playtestResults);
        }