Beispiel #1
0
        public void SpecialRoundLog(Rounders rounders, MetaAndTXTObjects Game1, MetaAndTXTObjects Game2)
        {
            GCLog(Utilities.SpecialRoundType(Game1.LevelName));
            if (Game1.CurrentRound.Number > Game2.CurrentRound.Number)
            {
                GCLog($"Round: {Game1.CurrentRound.Number} Game up until Round: {Game2.CurrentRound.Number}");
                GCLog(string.Join(", ", rounders.game1specialrounds));
            }
            else
            {
                GCLog($"Round: {Game1.CurrentRound.Number} Game");
                GCLog(string.Join(", ", rounders.game1specialrounds));
            }


            if (Game2.CurrentRound.Number > Game1.CurrentRound.Number)
            {
                GCLog($"Round: {Game2.CurrentRound.Number} Game up until Round: {Game1.CurrentRound.Number}");
                GCLog(string.Join(", ", rounders.game2specialrounds));
            }
            else
            {
                GCLog($"Round: {Game2.CurrentRound.Number} Game");
                GCLog(string.Join(", ", rounders.game1specialrounds));
            };
            GCLog($"Four Rounders: {rounders.G1FourRounders} | {rounders.G2FourRounders}");
            GCLog($"Five Rounders: {rounders.G1FiveRounders} | {rounders.G2FiveRounders}");
        }
Beispiel #2
0
        //functions
        public Rounders Specialroundcollection(MetaAndTXTObjects Game1, MetaAndTXTObjects Game2)
        {
            Rounders rounders = new Rounders();

            int lastfoundg1          = 0;
            int lastfoundg2          = 0;
            int InvaildGame1rounders = 0;
            int InvaildGame2rounders = 0;

            foreach (Round roundg1 in Game1.Rounds)
            {
                if (roundg1.IsSpecialRound == true)
                {
                    if (lastfoundg1 != 0)
                    {
                        if ((roundg1.Number - lastfoundg1) % 4 == 0)
                        {
                            rounders.G1FourRounders += 1;
                        }
                        else if ((roundg1.Number - lastfoundg1) % 5 == 0)
                        {
                            rounders.G1FiveRounders += 1;
                        }
                        else
                        {
                            InvaildGame1rounders += 1;
                        }
                    }

                    rounders.game1specialrounds.Add(roundg1.Number.ToString());
                    lastfoundg1 = (int)roundg1.Number;
                }
                if (roundg1.Number == Game2.CurrentRound.Number)
                {
                    break;
                }
            }
            foreach (Round roundg2 in Game2.Rounds)
            {
                if (roundg2.IsSpecialRound == true)
                {
                    if (lastfoundg2 != 0)
                    {
                        if ((roundg2.Number - lastfoundg2) % 4 == 0)
                        {
                            rounders.G2FourRounders += 1;
                        }
                        else if ((roundg2.Number - lastfoundg2) % 5 == 0)
                        {
                            rounders.G2FiveRounders += 1;
                        }
                        else
                        {
                            InvaildGame2rounders += 1;
                        }
                    }

                    rounders.game2specialrounds.Add(roundg2.Number.ToString());
                    lastfoundg2 = (int)roundg2.Number;
                }
                if (roundg2.Number == Game1.CurrentRound.Number)
                {
                    break;
                }
            }
            if (InvaildGame1rounders != 0)
            {
                Utilities.ShowMessageBox($" The {Game1.CurrentRound.Number.ToString()} game has invaild rounders");
            }
            if (InvaildGame2rounders != 0)
            {
                Utilities.ShowMessageBox($" The {Game2.CurrentRound.Number.ToString()} game has invaild rounders");
            }
            return(rounders);
        }
Beispiel #3
0
        public void TimComparison(MetaAndTXTObjects Game1, MetaAndTXTObjects Game2)
        {
            //Checks
            if (Game1 == null && Game2 == null)
            {
                Utilities.ShowMessageBox("Game/Games are not vaild");
                return;
            }

            if (Game1.PlayerCount != Game2.PlayerCount || Game1.LevelName != Game2.LevelName)
            {
                Utilities.ShowMessageBox("Game comparisons can only be done with games of the same map and same player count");
                return;
            }

            //Gamelabel
            string Game1MapName = Utilities.MapNameConv(Game1.LevelName);
            string Game2MapName = Utilities.MapNameConv(Game2.LevelName);

            if (Game1.PlayerCount == 1)
            {
                GCLabel($"{Game1MapName} | Round: {Game1.CurrentRound.Number} vs. Round: {Game2.CurrentRound.Number} | Solo ");
            }
            else
            {
                GCLabel($"{Game1MapName} | Round: {Game1.CurrentRound.Number} vs. Round: {Game2.CurrentRound.Number} | {Game1.PlayerCount} Player ");
            }

            if (Game1.Fh != null && Game2.Fh != null)
            {
                // header
                GCLog($" Round: {Game1.CurrentRound.Number} | Round: {Game2.CurrentRound.Number}");
                GCLog("");
                //special round  stuff
                if (Utilities.SpecialRoundType(Game1.LevelName) != "no special rounds")
                {
                    Rounders rounders = Specialroundcollection(Game1, Game2);
                    SpecialRoundLog(rounders, Game1, Game2);
                }
                //Indualvidual round comparison
                IRCLog($" (Round: {Game1.CurrentRound.Number} stats)  - (Round: {Game2.CurrentRound.Number} stats)");
                IDC(Game1, Game2);
                TimetoΔ(Game1, Game2);
            }
            else
            {
                // header
                GCLog($" Round: {Game1.CurrentRound.Number} | Round: {Game2.CurrentRound.Number}");
                GCLog("");
                //special round  stuff
                if (Utilities.SpecialRoundType(Game1.LevelName) != "no special rounds")
                {
                    Rounders rounders = Specialroundcollection(Game1, Game2);
                    SpecialRoundLog(rounders, Game1, Game2);
                }
                IRCLog($" (Round: {Game1.CurrentRound.Number} stats)  - (Round: {Game2.CurrentRound.Number} stats)");
                IDC(Game1, Game2);
                TimetoΔ(Game1, Game2);
            }


            this.Show();
        }