Example #1
0
        public string getInformationPname(ListPlayer P)
        {
            Console.WriteLine("Enter the name of the player whom you want to have information: ");
            string n   = Console.ReadLine();
            int    pos = 0;

            while (!(P.onList(n)))
            {
                Console.WriteLine("This player is not playing in this game !");
                Console.WriteLine("Please write a correct name.");
                Console.WriteLine("If you want to leave, press 'z'");
                n = Console.ReadLine();
                if (n == "z")
                {
                    return(null);
                }
            }
            return("Here is all the informations about this player \n" + P.getPlayerByName(n));
        }