コード例 #1
0
        public static void Reset_A_List_To_Its_Default_Values(List <string> listToReset, List <string> listOfDefaults)
        {
            ListWiper.Wipe_A_List_Clean(listToReset);

            for (int i = 0; i < listOfDefaults.Count; i++)
            {
                listToReset.Add(listOfDefaults[i]);
            }
        }
コード例 #2
0
 public UserRosterScreen()
 {
     InitializeComponent();
     this.BackColor = default;
     UserOpsFileHandler.Create_UserOps_File();
     ListWiper.Wipe_A_List_Clean(Program.userOps);
     UserOpsFileHandler.Read_UserOps_From_File(Program.userOps);
     CheckboxChecker.Check_All_The_Checkboxes_In_A_Page_Based_On_A_List(Program.userOps, RosterBox);
 }
コード例 #3
0
        private void ChapterFiltersBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            ListWiper.Wipe_A_List_Clean(Program.stageLists.chaptersToFilterOut);

            for (int i = 0; i < ChapterFiltersBox.Items.Count; i++)
            {
                if (ChapterFiltersBox.GetItemChecked(i) == false)
                {
                    Program.stageLists.chaptersToFilterOut.Add(ChapterFiltersBox.Items[i].ToString());
                }
            }
        }
コード例 #4
0
        private void RarityFiltersBox_SelectedIndexChanged_1(object sender, EventArgs e)
        {
            ListWiper.Wipe_A_List_Clean(Program.operatorRarityLists.raritiesToFilterOut);

            for (int i = 0; i < RarityFiltersBox.Items.Count; i++)
            {
                if (RarityFiltersBox.GetItemChecked(i) == false)
                {
                    Program.operatorRarityLists.raritiesToFilterOut.Add(RarityFiltersBox.Items[i].ToString());
                }
            }
        }
コード例 #5
0
        public static string Roll_For_Stage()
        {
            StageLists stageLists = Program.stageLists;

            ListWiper.Wipe_A_List_Clean(stageLists.userStages);

            foreach (string stages in stageLists.userStagesDefault)
            {
                stageLists.userStages.Add(stages);
            }

            StageFilter.Filter_Out_Unselected_Stages_From_Pool_Of_Maps(stageLists);

            Random randomNumberGenerator = Program.randomNumberGenerator;

            try
            {
                return(stageLists.userStages[randomNumberGenerator.Next(0, stageLists.userStages.Count)]);
            }
            catch (ArgumentOutOfRangeException)
            {
                return("Stage Not Found!");
            }
        }
コード例 #6
0
        public static void Populate_UserOps_Lists()
        {
            OperatorClassLists operatorClassesLists = Program.operatorClassesLists;
            List <string>      userOps = Program.userOps;

            ListWiper.Wipe_Many_Lists_Clean(operatorClassesLists.userMedicOperators, operatorClassesLists.userSupporterOperators, operatorClassesLists.userSniperOperators, operatorClassesLists.userVanguardOperators, operatorClassesLists.userSpecialistOperators, operatorClassesLists.userDefenderOperators, operatorClassesLists.userGuardOperators, operatorClassesLists.userCasterOperators);

            for (int i = 0; i < userOps.Count; i++)
            {
                for (int x = 0; x < operatorClassesLists.medicOperators.Count; x++)
                {
                    if (userOps[i] == operatorClassesLists.medicOperators[x])
                    {
                        operatorClassesLists.userMedicOperators.Add(operatorClassesLists.medicOperators[x]);
                        operatorClassesLists.defaultUserMedicOperators.Add(operatorClassesLists.medicOperators[x]);
                    }
                }
            }

            for (int i = 0; i < userOps.Count; i++)
            {
                for (int x = 0; x < operatorClassesLists.supporterOperators.Count; x++)
                {
                    if (userOps[i] == operatorClassesLists.supporterOperators[x])
                    {
                        operatorClassesLists.userSupporterOperators.Add(operatorClassesLists.supporterOperators[x]);
                        operatorClassesLists.defaultUserSupporterOperators.Add(operatorClassesLists.supporterOperators[x]);
                    }
                }
            }

            for (int i = 0; i < userOps.Count; i++)
            {
                for (int x = 0; x < operatorClassesLists.sniperOperators.Count; x++)
                {
                    if (userOps[i] == operatorClassesLists.sniperOperators[x])
                    {
                        operatorClassesLists.userSniperOperators.Add(operatorClassesLists.sniperOperators[x]);
                        operatorClassesLists.defaultUserSniperOperators.Add(operatorClassesLists.sniperOperators[x]);
                    }
                }
            }

            for (int i = 0; i < userOps.Count; i++)
            {
                for (int x = 0; x < operatorClassesLists.vanguardOperators.Count; x++)
                {
                    if (userOps[i] == operatorClassesLists.vanguardOperators[x])
                    {
                        operatorClassesLists.userVanguardOperators.Add(operatorClassesLists.vanguardOperators[x]);
                        operatorClassesLists.defaultUserVanguardOperators.Add(operatorClassesLists.vanguardOperators[x]);
                    }
                }
            }

            for (int i = 0; i < userOps.Count; i++)
            {
                for (int x = 0; x < operatorClassesLists.specialistOperators.Count; x++)
                {
                    if (userOps[i] == operatorClassesLists.specialistOperators[x])
                    {
                        operatorClassesLists.userSpecialistOperators.Add(operatorClassesLists.specialistOperators[x]);
                        operatorClassesLists.defaultUserSpecialistOperators.Add(operatorClassesLists.specialistOperators[x]);
                    }
                }
            }

            for (int i = 0; i < userOps.Count; i++)
            {
                for (int x = 0; x < operatorClassesLists.defenderOperators.Count; x++)
                {
                    if (userOps[i] == operatorClassesLists.defenderOperators[x])
                    {
                        operatorClassesLists.userDefenderOperators.Add(operatorClassesLists.defenderOperators[x]);
                        operatorClassesLists.defaultUserDefenderOperators.Add(operatorClassesLists.defenderOperators[x]);
                    }
                }
            }

            for (int i = 0; i < userOps.Count; i++)
            {
                for (int x = 0; x < operatorClassesLists.guardOperators.Count; x++)
                {
                    if (userOps[i] == operatorClassesLists.guardOperators[x])
                    {
                        operatorClassesLists.userGuardOperators.Add(operatorClassesLists.guardOperators[x]);
                        operatorClassesLists.defaultUserGuardOperators.Add(operatorClassesLists.guardOperators[x]);
                    }
                }
            }

            for (int i = 0; i < userOps.Count; i++)
            {
                for (int x = 0; x < operatorClassesLists.casterOperators.Count; x++)
                {
                    if (userOps[i] == operatorClassesLists.casterOperators[x])
                    {
                        operatorClassesLists.userCasterOperators.Add(operatorClassesLists.casterOperators[x]);
                        operatorClassesLists.defaultUserCasterOperators.Add(operatorClassesLists.casterOperators[x]);
                    }
                }
            }
        }
コード例 #7
0
        public static void Roll_Ops_And_Create_Roster(int maxSquadSize)
        {
            int           currentSquadSize   = 1;
            List <string> rolledOps          = Program.rolledOps;
            List <string> userOps            = Program.userOps;
            List <string> potentialOpsToRoll = Program.potentialOpsToRoll;

            ListWiper.Wipe_Many_Lists_Clean(rolledOps, userOps, potentialOpsToRoll);

            UserOpsFileHandler.Read_UserOps_From_File(userOps);


            OperatorClassLists operatorClassLists = Program.operatorClassesLists;

            List <List <string> > listsToReset = new List <List <string> >()
            {
                operatorClassLists.userMedicOperators, operatorClassLists.userSupporterOperators, operatorClassLists.userSniperOperators, operatorClassLists.userVanguardOperators, operatorClassLists.userSpecialistOperators, operatorClassLists.userDefenderOperators, operatorClassLists.userGuardOperators, operatorClassLists.userCasterOperators
            };
            List <List <string> > listsOfDefaults = new List <List <string> >()
            {
                operatorClassLists.defaultUserMedicOperators, operatorClassLists.defaultUserSupporterOperators, operatorClassLists.defaultUserSniperOperators, operatorClassLists.defaultUserVanguardOperators, operatorClassLists.defaultUserSpecialistOperators, operatorClassLists.defaultUserDefenderOperators, operatorClassLists.defaultUserGuardOperators, operatorClassLists.defaultUserCasterOperators
            };

            for (int i = 0; i < listsOfDefaults.Count; i++)
            {
                ListResetter.Reset_A_List_To_Its_Default_Values(listsToReset[i], listsOfDefaults[i]);
            }


            OperatorRarityLists operatorRarityLists = Program.operatorRarityLists;

            ClassesFilter.Filter_Out_Unselected_Classes_From_Pool_Of_UserOps(operatorClassLists, userOps);
            RaritiesFilter.Filter_Out_Unselected_Rarities_From_Pool_Of_UserOps(operatorRarityLists, operatorClassLists, userOps);

            int    medicLimit            = Program.medicLimit;
            int    supporterLimit        = Program.supporterLimit;
            int    sniperLimit           = Program.sniperLimit;
            int    vanguardLimit         = Program.vanguardLimit;
            int    specialistLimit       = Program.specialistLimit;
            int    defenderLimit         = Program.defenderLimit;
            int    guardLimit            = Program.guardLimit;
            int    casterLimit           = Program.casterLimit;
            Random randomNumberGenerator = Program.randomNumberGenerator;


            PotentialOpsAdder.Add_Ops_To_Potential_List(medicLimit, operatorClassLists.userMedicOperators, randomNumberGenerator, potentialOpsToRoll);
            UserOpsClassRemover.Remove_Class_From_UserOps_List(medicLimit, userOps, operatorClassLists.userMedicOperators);
            PotentialOpsAdder.Add_Ops_To_Potential_List(supporterLimit, operatorClassLists.userSupporterOperators, randomNumberGenerator, potentialOpsToRoll);
            UserOpsClassRemover.Remove_Class_From_UserOps_List(supporterLimit, userOps, operatorClassLists.userSupporterOperators);
            PotentialOpsAdder.Add_Ops_To_Potential_List(sniperLimit, operatorClassLists.userSniperOperators, randomNumberGenerator, potentialOpsToRoll);
            UserOpsClassRemover.Remove_Class_From_UserOps_List(sniperLimit, userOps, operatorClassLists.userSniperOperators);
            PotentialOpsAdder.Add_Ops_To_Potential_List(vanguardLimit, operatorClassLists.userVanguardOperators, randomNumberGenerator, potentialOpsToRoll);
            UserOpsClassRemover.Remove_Class_From_UserOps_List(vanguardLimit, userOps, operatorClassLists.userVanguardOperators);
            PotentialOpsAdder.Add_Ops_To_Potential_List(specialistLimit, operatorClassLists.userSpecialistOperators, randomNumberGenerator, potentialOpsToRoll);
            UserOpsClassRemover.Remove_Class_From_UserOps_List(specialistLimit, userOps, operatorClassLists.userSpecialistOperators);
            PotentialOpsAdder.Add_Ops_To_Potential_List(defenderLimit, operatorClassLists.userDefenderOperators, randomNumberGenerator, potentialOpsToRoll);
            UserOpsClassRemover.Remove_Class_From_UserOps_List(defenderLimit, userOps, operatorClassLists.userDefenderOperators);
            PotentialOpsAdder.Add_Ops_To_Potential_List(guardLimit, operatorClassLists.userGuardOperators, randomNumberGenerator, potentialOpsToRoll);
            UserOpsClassRemover.Remove_Class_From_UserOps_List(guardLimit, userOps, operatorClassLists.userGuardOperators);
            PotentialOpsAdder.Add_Ops_To_Potential_List(casterLimit, operatorClassLists.userCasterOperators, randomNumberGenerator, potentialOpsToRoll);
            UserOpsClassRemover.Remove_Class_From_UserOps_List(casterLimit, userOps, operatorClassLists.userCasterOperators);



            currentSquadSize = PotentialOpsToRolledOpsAdder.Add_PotentialOps_List_To_List_Of_RolledOps_And_Increment_SquadSize(potentialOpsToRoll, rolledOps, currentSquadSize);


            PotentialOpsFromUserOpsRemover.Remove_PotentialOps_From_The_List_Of_UserOps(potentialOpsToRoll, userOps);



            RandomUserOpsToRolledOpsAdder.Add_RandomUserOps_To_List_Of_RolledOps(maxSquadSize, currentSquadSize, randomNumberGenerator, userOps, rolledOps);



            ListSorter.Sort_A_List_Alphabetically(rolledOps);
        }