Exemple #1
0
        private void UpdateMatchPregame(Match match, MatchAnalysis analysis)
        {
            if (match == null || analysis == null)
            {
                MatchWinrateRedTxt.Text  = "NULL";
                MatchWinrateBlueTxt.Text = "NULL";

                MatchExpectedWinnerTxt.Text       = "NULL";
                MatchExpectedWinnerTxt.Foreground = new SolidColorBrush(TITLE_GRAY);
                MatchAdvantageTxt.Text            = "NULL";

                MatchExpectedFinalScoreRedTxt.Text  = "NULL";
                MatchExpectedFinalScoreBlueTxt.Text = "NULL";

                MatchProfileTxt.Text = "NULL";
                return;
            }

            MatchWinrateRedTxt.Text  = analysis.RedWinRateMean.ToStringPct();
            MatchWinrateBlueTxt.Text = analysis.BlueWinRateMean.ToStringPct();

            MatchExpectedWinnerTxt.Text       = analysis.ExpectedWinner.ToString();
            MatchExpectedWinnerTxt.Foreground = new SolidColorBrush(
                analysis.ExpectedWinner == AllianceColor.Red ?
                LIGHT_RED : LIGHT_BLUE);
            MatchAdvantageTxt.Text = analysis.Advantage.ToString();

            MatchExpectedFinalScoreRedTxt.Text  = analysis.RedExpectedFinalScore.ToString();
            MatchExpectedFinalScoreBlueTxt.Text = analysis.BlueExpectedFinalScore.ToString();

            MatchProfileTxt.Text = analysis.GameProfileValue.ToString();
        }
Exemple #2
0
        private void UpdateMatchPostgame(Match match, MatchAnalysis analysis)
        {
            if (match == null || analysis == null)
            {
                MatchDefenseRedTxt.Text  = "NULL";
                MatchDefenseBlueTxt.Text = "NULL";

                MatchGoalCountRedTxt.Text  = "NULL";
                MatchGoalCountBlueTxt.Text = "NULL";
                return;
            }

            if (analysis.Pregame)
            {
                MatchDefenseRedTxt.Text  = "PREGAME";
                MatchDefenseBlueTxt.Text = "PREGAME";

                MatchGoalCountRedTxt.Text  = "PREGAME";
                MatchGoalCountBlueTxt.Text = "PREGAME";
                return;
            }

            MatchDefenseRedTxt.Text  = analysis.RedDefenseMean.Value.ToString();
            MatchDefenseBlueTxt.Text = analysis.BlueDefenseMean.Value.ToString();

            MatchGoalCountRedTxt.Text  = analysis.RedGoalCount.Value.ToString();
            MatchGoalCountBlueTxt.Text = analysis.BlueGoalCount.Value.ToString();
        }
Exemple #3
0
        public void UpdateMatchesTab()
        {
            Match         selected         = MatchSelectionList.SelectedItem as Match;
            MatchAnalysis selectedAnalysis = FrcAnalysis.LoadMatch(selected.Number);

            if (selected == null)
            {
                Util.DebugLog(LogLevel.Error, "ANALYSIS",
                              "Selected match was null or not a match at all.");
            }

            UpdateMatchSummary(selected);
            UpdateMatchPregame(selected, selectedAnalysis);
            UpdateMatchPostgame(selected, selectedAnalysis);
        }