Пример #1
0
        static void addMember(Team team)
        {
            //Init member attributes
            string codeName = "";
            int    skill    = 0;
            double courage  = 0.0;

            Console.Clear();

            while (codeName == "")
            {
                codeName = getName();
            }

            while (skill <= 0)
            {
                skill = getSkill();
            }

            Console.WriteLine($"How courageous is {codeName}?");
            courage = Convert.ToDouble(Console.ReadLine());

            var member = new HeistMember(codeName, skill, courage);


            team.addToTeam(member);
        }
Пример #2
0
 public void addToTeam(HeistMember member)
 {
     MemberList.Add(member);
     Console.WriteLine("Team Member Added Successfully!");
 }