示例#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!");
 }