Ejemplo n.º 1
0
        private void GenerateRandomPowers()
        {
            List <int> randomNumbers = new List <int>();

            for (int i = 0; i < 4; i++)
            {
                randomNumbers.Add(Ultilities.randomNumber(0, PowerList.Count - 1));
            }

            power1DataLabel.Text = PowerList[randomNumbers[0]];
            power2DataLabel.Text = PowerList[randomNumbers[1]];
            power3DataLabel.Text = PowerList[randomNumbers[2]];
            power4DataLabel.Text = PowerList[randomNumbers[3]];

            Power power1 = new Power(power1DataLabel.Text, 1);
            Power power2 = new Power(power2DataLabel.Text, 2);
            Power power3 = new Power(power3DataLabel.Text, 3);
            Power power4 = new Power(power4DataLabel.Text, 4);

            Program.character.Powers = new List <Power>();
            Program.character.Powers.Add(power1);
            Program.character.Powers.Add(power2);
            Program.character.Powers.Add(power3);
            Program.character.Powers.Add(power4);
        }
Ejemplo n.º 2
0
        private void GenerateNames()
        {
            int firstNameRandomIndex = Ultilities.randomNumber(0, FirstNameList.Count - 1);
            int lastNameRandomIndex  = Ultilities.randomNumber(0, LastNameList.Count - 1);

            firstNameDataLabel.Text = FirstNameList[firstNameRandomIndex];
            lastNameDataLabel.Text  = LastNameList[lastNameRandomIndex];
            heroNameTextBox.Text    = FirstNameList[firstNameRandomIndex] + " " + LastNameList[lastNameRandomIndex];

            Program.character.FirstName = firstNameDataLabel.Text;
            Program.character.LastName  = lastNameDataLabel.Text;
            Program.character.HeroName  = heroNameTextBox.Text;
        }
Ejemplo n.º 3
0
        private void generateRandomAbility()
        {
            List <int>   abilities = new List <int>();
            List <Label> labels    = new List <Label>();

            //8 Text field
            for (int i = 0; i < 8; i++)
            {
                abilities.Add(Ultilities.randomNumber(10, 50));
            }


            //8 Label
            labels.Add(fightingDataLabel);
            labels.Add(agilityDataLabel);
            labels.Add(strengthDataLabel);
            labels.Add(enduranceDataLabel);

            labels.Add(reasonDataLabel);
            labels.Add(intuitionDataLabel);
            labels.Add(psycheDataLabel);
            labels.Add(popularityDataLabel);

            for (int i = 0; i < abilities.Count; i++)
            {
                labels[i].Text = abilities[i].ToString();
            }

            Program.character.Fighting = fightingDataLabel.Text;
            Program.character.Agility  = agilityDataLabel.Text;
            Program.character.Strength = strengthDataLabel.Text;

            Program.character.Endurance = enduranceDataLabel.Text;
            Program.character.Reason    = reasonDataLabel.Text;
            Program.character.Intuition = intuitionDataLabel.Text;

            Program.character.Psyche     = psycheDataLabel.Text;
            Program.character.Popularity = popularityDataLabel.Text;
        }