Exemple #1
0
    private static void AddCurrentLeutenantGeneral(List <Soldier> dudes, string[] info)
    {
        LeutenantGeneral currentLeutenantGeneral = new LeutenantGeneral(info[1], info[2], info[3], double.Parse(info[4]));

        for (int i = 5; i < info.Length; i++)
        {
            string currentPrivateId = info[i];

            currentLeutenantGeneral.AddPrivates(dudes.Find(x => x.Id == currentPrivateId) as Private);
        }
        dudes.Add(currentLeutenantGeneral);
    }