public void AutoAdjustCharacterWeight(List <string> words) { Dictionary <char, int> weights = new Dictionary <char, int>(); foreach (string word in words) { string upperWord = word.ToUpper(); for (int i = 0; i < word.Length; i++) { if (weights.ContainsKey(upperWord[i])) { weights[upperWord[i]]++; } else { weights[upperWord[i]] = 1; } } } print("auto"); characterWeights.Clear(); foreach (KeyValuePair <char, int> weight in weights) { CharacterWeight tempWeight = new CharacterWeight(); tempWeight.character = weight.Key + ""; tempWeight.weight = weight.Value; characterWeights.Add(tempWeight); } }
public PersonalInformation(CharacterName characterName, CharacterSex characterSex, CharacterRace characterRace, CharacterBackground characterBackground, CharacterAge characterAge, CharacterHeight characterHeight, CharacterWeight characterWeight, CharacterHairStyle hairStyle) { cName = characterName; cRace = characterRace; cSex = characterSex; cBackground = characterBackground; cHeight = characterHeight; cWeight = characterWeight; cAge = characterAge; cHair = hairStyle; }