コード例 #1
0
 public Footballer(Footballer x) : base(x)
 {
     TeamName   = x.TeamName;
     NumOfGoal  = x.NumOfGoal;
     NumOfGames = x.NumOfGames;
     Position   = x.Position;
     NumOfGames = 10;
 }
コード例 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            string x, y, z, j = "0";
            string h = "0";
            string m, n, k;
            int    d, g, b;

            Console.WriteLine("Enter First Name");
            x = Console.ReadLine();
            Console.WriteLine("Enter Last Name");
            y = Console.ReadLine();
            Console.WriteLine("Enter id");
            z = Console.ReadLine();
            Console.WriteLine("Enter Carrier Time");
            m = Console.ReadLine();
            d = Int32.Parse(m);
            while (h != "Arsenal" && h != "Totenham" && h != "Chelsea" && h != "Man City" && h != "Liverpool")
            {
                Console.WriteLine("Enter Correct Team Name");
                h = Console.ReadLine();
            }
            while (j != "Striker" && j != "Defender" && j != "Goal Keeper" && j != "Full Back" && j != "MidelFielder")
            {
                Console.WriteLine("Enter Position ");
                j = Console.ReadLine();
            }
            Console.WriteLine("Enter Num of Goals");
            n = Console.ReadLine();
            g = Int32.Parse(n);
            Console.WriteLine("Enter Num Of Games");
            k = Console.ReadLine();
            b = Int32.Parse(k);
            Footballer T = new Footballer(x, y, z, d, h, j, g, b);

            if (h == "Arsenal")
            {
                MyLeague.Teams[0].AddPlayer(T);
            }
            if (h == "Chelsea")
            {
                MyLeague.Teams[1].AddPlayer(T);
            }
            if (h == "Totenham")
            {
                MyLeague.Teams[2].AddPlayer(T);
            }
            if (h == "Liverpool")
            {
                MyLeague.Teams[3].AddPlayer(T);
            }
            if (h == "Man City")
            {
                MyLeague.Teams[4].AddPlayer(T);
            }
            Console.WriteLine("Footballer Added you can back to the menu");
            return;
        }
コード例 #3
0
 public void AddPlayer(Footballer x)
 {
     Footballer[] temp = new Footballer[NumOfPlayers];
     for (int i = 0; i < NumOfPlayers; i++)
     {
         temp[i] = Footballers[i];
     }
     NumOfPlayers++;
     Footballers = new Footballer[NumOfPlayers];
     for (int i = 0; i < NumOfPlayers - 1; i++)
     {
         Footballers[i] = temp[i];
     }
     Footballers[NumOfPlayers - 1] = x;
 }
コード例 #4
0
        public void MakerTTi()
        {
            int v = 0;

            Workers = new Worker[NumofWorkers];
            for (int i = 0; i < 5; i++)
            {
                Workers[v] = new Coach(Teams[i].GetCoach());
                v++;
            }
            for (int i = 0; i < 5; i++)
            {
                Workers[v] = new Manager(Teams[i].GetManager());
                v++;
            }
            for (int i = 0; i < 15; i++)
            {
                Workers[v] = new Footballer(Teams[0].GetPlayer(i));
                v++;
            }
            for (int i = 0; i < 15; i++)
            {
                Workers[v] = new Footballer(Teams[1].GetPlayer(i));
                v++;
            }
            for (int i = 0; i < 15; i++)
            {
                Workers[v] = new Footballer(Teams[2].GetPlayer(i));
                v++;
            }
            for (int i = 0; i < 15; i++)
            {
                Workers[v] = new Footballer(Teams[3].GetPlayer(i));
                v++;
            }
            for (int i = 0; i < 15; i++)
            {
                Workers[v] = new Footballer(Teams[4].GetPlayer(i));
                v++;
            }
        }
コード例 #5
0
        public Leugatahall()
        {
            ReffereeNum = 4;
            Refferees   = new Refferee[4];
            for (int i = 0; i < ReffereeNum; i++)
            {
                Refferees[i] = new Refferee("try", "try", "try", 5, 3, 5);
            }
            Random random = new Random();

            NumofWorkers = 10;
            Teams        = new Team[5];
            for (int i = 0; i < 5; i++)
            {
                Teams[i] = new Team();
            }
            Teams[0].SetTeamName("Arsenal");
            Teams[1].SetTeamName("Chelsea");
            Teams[2].SetTeamName("Totenham");
            Teams[3].SetTeamName("Liverpool");
            Teams[4].SetTeamName("Man City");
            for (int i = 0; i < 5; i++)
            {
                if (i == 0)
                {
                    Teams[i].SetStadium("Emirats");
                    for (int j = 0; j < 15; j++)
                    {
                        if (j >= 0 && j < 2)
                        {
                            string a;
                            string patha = Path.GetRandomFileName();
                            patha = patha.Replace(".", ""); // Remove period.
                            a     = patha.Substring(0, 8);
                            string b;
                            string pathb = Path.GetRandomFileName();
                            pathb = pathb.Replace(".", ""); // Remove period.
                            b     = pathb.Substring(0, 8);
                            string c;
                            string pathc = Path.GetRandomFileName();
                            pathc = pathc.Replace(".", ""); // Remove period.
                            c     = pathb.Substring(0, 8);
                            Footballer x = new Footballer(a, b, c, random.Next(0, 26), "Arsenal", "GoalKeeper", random.Next(0, 38), random.Next(0, 32));
                            Teams[i].AddPlayer(x);
                            NumofWorkers++;
                        }
                        if (j >= 2 && j < 5)
                        {
                            string a;
                            string patha = Path.GetRandomFileName();
                            patha = patha.Replace(".", ""); // Remove period.
                            a     = patha.Substring(0, 8);
                            string b;
                            string pathb = Path.GetRandomFileName();
                            pathb = pathb.Replace(".", ""); // Remove period.
                            b     = pathb.Substring(0, 8);
                            string c;
                            string pathc = Path.GetRandomFileName();
                            pathc = pathc.Replace(".", ""); // Remove period.
                            c     = pathb.Substring(0, 8);
                            Footballer x = new Footballer(a, b, c, random.Next(0, 26), "Arsenal", "Striker", random.Next(0, 38), random.Next(0, 32));
                            Teams[i].AddPlayer(x);
                            NumofWorkers++;
                        }
                        if (j >= 5 && j < 9)
                        {
                            string a;
                            string patha = Path.GetRandomFileName();
                            patha = patha.Replace(".", ""); // Remove period.
                            a     = patha.Substring(0, 8);
                            string b;
                            string pathb = Path.GetRandomFileName();
                            pathb = pathb.Replace(".", ""); // Remove period.
                            b     = pathb.Substring(0, 8);
                            string c;
                            string pathc = Path.GetRandomFileName();
                            pathc = pathc.Replace(".", ""); // Remove period.
                            c     = pathb.Substring(0, 8);
                            Footballer x = new Footballer(a, b, c, random.Next(0, 26), "Arsenal", "midelfield", random.Next(0, 38), random.Next(0, 32));
                            Teams[i].AddPlayer(x);
                            NumofWorkers++;
                        }
                        if (j >= 9 && j < 12)
                        {
                            string a;
                            string patha = Path.GetRandomFileName();
                            patha = patha.Replace(".", ""); // Remove period.
                            a     = patha.Substring(0, 8);
                            string b;
                            string pathb = Path.GetRandomFileName();
                            pathb = pathb.Replace(".", ""); // Remove period.
                            b     = pathb.Substring(0, 8);
                            string c;
                            string pathc = Path.GetRandomFileName();
                            pathc = pathc.Replace(".", ""); // Remove period.
                            c     = pathb.Substring(0, 8);
                            Footballer x = new Footballer(a, b, c, random.Next(0, 26), "Arsenal", "FullBack", random.Next(0, 38), random.Next(0, 32));
                            Teams[i].AddPlayer(x);
                            NumofWorkers++;
                        }
                        if (j >= 12 && j < 15)
                        {
                            string a;
                            string patha = Path.GetRandomFileName();
                            patha = patha.Replace(".", ""); // Remove period.
                            a     = patha.Substring(0, 8);
                            string b;
                            string pathb = Path.GetRandomFileName();
                            pathb = pathb.Replace(".", ""); // Remove period.
                            b     = pathb.Substring(0, 8);
                            string c;
                            string pathc = Path.GetRandomFileName();
                            pathc = pathc.Replace(".", ""); // Remove period.
                            c     = pathb.Substring(0, 8);
                            Footballer x = new Footballer(a, b, c, random.Next(0, 26), "Arsenal", "Defender", random.Next(0, 38), random.Next(0, 32));
                            Teams[i].AddPlayer(x);
                            NumofWorkers++;
                        }
                        string g;
                        string pathg = Path.GetRandomFileName();
                        pathg = pathg.Replace(".", ""); // Remove period.
                        g     = pathg.Substring(0, 8);
                        string h;
                        string pathh = Path.GetRandomFileName();
                        pathh = pathh.Replace(".", ""); // Remove period.
                        h     = pathh.Substring(0, 8);
                        string k;
                        string pathk = Path.GetRandomFileName();
                        pathk = pathk.Replace(".", ""); // Remove period.
                        k     = pathk.Substring(0, 8);
                        Teams[i].setCoachs(g, h, k, random.Next(0, 9999999), "Arsenal", random.Next(0, 20));
                        Manager T = new Manager("Emery", "Yoram", "3214123", 14);
                        Teams[i].addManager(T);
                    }
                }
                if (i == 1)
                {
                    Teams[i].SetStadium("Stamford bridge");
                    for (int j = 0; j < 15; j++)
                    {
                        if (j >= 0 && j < 2)
                        {
                            string a;
                            string patha = Path.GetRandomFileName();
                            patha = patha.Replace(".", ""); // Remove period.
                            a     = patha.Substring(0, 8);
                            string b;
                            string pathb = Path.GetRandomFileName();
                            pathb = pathb.Replace(".", ""); // Remove period.
                            b     = pathb.Substring(0, 8);
                            string c;
                            string pathc = Path.GetRandomFileName();
                            pathc = pathc.Replace(".", ""); // Remove period.
                            c     = pathb.Substring(0, 8);
                            Footballer x = new Footballer(a, b, c, random.Next(0, 26), "Chelsea", "GoalKeeper", random.Next(0, 38), random.Next(0, 32));
                            Teams[i].AddPlayer(x);
                            NumofWorkers++;
                        }
                        if (j >= 2 && j < 5)
                        {
                            string a;
                            string patha = Path.GetRandomFileName();
                            patha = patha.Replace(".", ""); // Remove period.
                            a     = patha.Substring(0, 8);
                            string b;
                            string pathb = Path.GetRandomFileName();
                            pathb = pathb.Replace(".", ""); // Remove period.
                            b     = pathb.Substring(0, 8);
                            string c;
                            string pathc = Path.GetRandomFileName();
                            pathc = pathc.Replace(".", ""); // Remove period.
                            c     = pathb.Substring(0, 8);
                            Footballer x = new Footballer(a, b, c, random.Next(0, 26), "Chelsea", "Striker", random.Next(0, 38), random.Next(0, 32));
                            Teams[i].AddPlayer(x);
                            NumofWorkers++;
                        }
                        if (j >= 5 && j < 9)
                        {
                            string a;
                            string patha = Path.GetRandomFileName();
                            patha = patha.Replace(".", ""); // Remove period.
                            a     = patha.Substring(0, 8);
                            string b;
                            string pathb = Path.GetRandomFileName();
                            pathb = pathb.Replace(".", ""); // Remove period.
                            b     = pathb.Substring(0, 8);
                            string c;
                            string pathc = Path.GetRandomFileName();
                            pathc = pathc.Replace(".", ""); // Remove period.
                            c     = pathb.Substring(0, 8);
                            Footballer x = new Footballer(a, b, c, random.Next(0, 26), "Chelsea", "midelfield", random.Next(0, 38), random.Next(0, 32));
                            Teams[i].AddPlayer(x);
                            NumofWorkers++;
                        }
                        if (j >= 9 && j < 12)
                        {
                            string a;
                            string patha = Path.GetRandomFileName();
                            patha = patha.Replace(".", ""); // Remove period.
                            a     = patha.Substring(0, 8);
                            string b;
                            string pathb = Path.GetRandomFileName();
                            pathb = pathb.Replace(".", ""); // Remove period.
                            b     = pathb.Substring(0, 8);
                            string c;
                            string pathc = Path.GetRandomFileName();
                            pathc = pathc.Replace(".", ""); // Remove period.
                            c     = pathb.Substring(0, 8);
                            Footballer x = new Footballer(a, b, c, random.Next(0, 26), "Chelsea", "FullBack", random.Next(0, 38), random.Next(0, 32));
                            Teams[i].AddPlayer(x);
                            NumofWorkers++;
                        }
                        if (j >= 12 && j < 15)
                        {
                            string a;
                            string patha = Path.GetRandomFileName();
                            patha = patha.Replace(".", ""); // Remove period.
                            a     = patha.Substring(0, 8);
                            string b;
                            string pathb = Path.GetRandomFileName();
                            pathb = pathb.Replace(".", ""); // Remove period.
                            b     = pathb.Substring(0, 8);
                            string c;
                            string pathc = Path.GetRandomFileName();
                            pathc = pathc.Replace(".", ""); // Remove period.
                            c     = pathb.Substring(0, 8);
                            Footballer x = new Footballer(a, b, c, random.Next(0, 26), "Chelsea", "Defender", random.Next(0, 38), random.Next(0, 32));
                            Teams[i].AddPlayer(x);
                            NumofWorkers++;
                        }
                        string g;
                        string pathg = Path.GetRandomFileName();
                        pathg = pathg.Replace(".", ""); // Remove period.
                        g     = pathg.Substring(0, 8);
                        string h;
                        string pathh = Path.GetRandomFileName();
                        pathh = pathh.Replace(".", ""); // Remove period.
                        h     = pathh.Substring(0, 8);
                        string k;
                        string pathk = Path.GetRandomFileName();
                        pathk = pathk.Replace(".", ""); // Remove period.
                        k     = pathk.Substring(0, 8);
                        Teams[i].setCoachs(g, h, k, random.Next(0, 9999999), "Chelsea", random.Next(0, 20));
                        Manager T = new Manager("Frank", "Lampard", "3214123", 14);
                        Teams[i].addManager(T);
                    }
                }
                if (i == 2)
                {
                    Teams[i].SetStadium("Wembley");
                    for (int j = 0; j < 15; j++)
                    {
                        if (j >= 0 && j < 2)
                        {
                            string a;
                            string patha = Path.GetRandomFileName();
                            patha = patha.Replace(".", ""); // Remove period.
                            a     = patha.Substring(0, 8);
                            string b;
                            string pathb = Path.GetRandomFileName();
                            pathb = pathb.Replace(".", ""); // Remove period.
                            b     = pathb.Substring(0, 8);
                            string c;
                            string pathc = Path.GetRandomFileName();
                            pathc = pathc.Replace(".", ""); // Remove period.
                            c     = pathb.Substring(0, 8);
                            Footballer x = new Footballer(a, b, c, random.Next(0, 26), "Totenham", "GoalKeeper", random.Next(0, 38), random.Next(0, 32));
                            Teams[i].AddPlayer(x);
                            NumofWorkers++;
                        }
                        if (j >= 2 && j < 5)
                        {
                            string a;
                            string patha = Path.GetRandomFileName();
                            patha = patha.Replace(".", ""); // Remove period.
                            a     = patha.Substring(0, 8);
                            string b;
                            string pathb = Path.GetRandomFileName();
                            pathb = pathb.Replace(".", ""); // Remove period.
                            b     = pathb.Substring(0, 8);
                            string c;
                            string pathc = Path.GetRandomFileName();
                            pathc = pathc.Replace(".", ""); // Remove period.
                            c     = pathb.Substring(0, 8);
                            Footballer x = new Footballer(a, b, c, random.Next(0, 26), "Totenham", "Striker", random.Next(0, 38), random.Next(0, 32));
                            Teams[i].AddPlayer(x);
                            NumofWorkers++;
                        }
                        if (j >= 5 && j < 9)
                        {
                            string a;
                            string patha = Path.GetRandomFileName();
                            patha = patha.Replace(".", ""); // Remove period.
                            a     = patha.Substring(0, 8);
                            string b;
                            string pathb = Path.GetRandomFileName();
                            pathb = pathb.Replace(".", ""); // Remove period.
                            b     = pathb.Substring(0, 8);
                            string c;
                            string pathc = Path.GetRandomFileName();
                            pathc = pathc.Replace(".", ""); // Remove period.
                            c     = pathb.Substring(0, 8);
                            Footballer x = new Footballer(a, b, c, random.Next(0, 26), "Totenham", "midelfield", random.Next(0, 38), random.Next(0, 32));
                            Teams[i].AddPlayer(x);
                            NumofWorkers++;
                        }
                        if (j >= 9 && j < 12)
                        {
                            string a;
                            string patha = Path.GetRandomFileName();
                            patha = patha.Replace(".", ""); // Remove period.
                            a     = patha.Substring(0, 8);
                            string b;
                            string pathb = Path.GetRandomFileName();
                            pathb = pathb.Replace(".", ""); // Remove period.
                            b     = pathb.Substring(0, 8);
                            string c;
                            string pathc = Path.GetRandomFileName();
                            pathc = pathc.Replace(".", ""); // Remove period.
                            c     = pathb.Substring(0, 8);
                            Footballer x = new Footballer(a, b, c, random.Next(0, 26), "Totenham", "FullBack", random.Next(0, 38), random.Next(0, 32));
                            Teams[i].AddPlayer(x);
                            NumofWorkers++;
                        }
                        if (j >= 12 && j < 15)
                        {
                            string a;
                            string patha = Path.GetRandomFileName();
                            patha = patha.Replace(".", ""); // Remove period.
                            a     = patha.Substring(0, 8);
                            string b;
                            string pathb = Path.GetRandomFileName();
                            pathb = pathb.Replace(".", ""); // Remove period.
                            b     = pathb.Substring(0, 8);
                            string c;
                            string pathc = Path.GetRandomFileName();
                            pathc = pathc.Replace(".", ""); // Remove period.
                            c     = pathb.Substring(0, 8);
                            Footballer x = new Footballer(a, b, c, random.Next(0, 26), "Totenham", "Defender", random.Next(0, 38), random.Next(0, 32));
                            Teams[i].AddPlayer(x);
                            NumofWorkers++;
                        }
                        string g;
                        string pathg = Path.GetRandomFileName();
                        pathg = pathg.Replace(".", ""); // Remove period.
                        g     = pathg.Substring(0, 8);
                        string h;
                        string pathh = Path.GetRandomFileName();
                        pathh = pathh.Replace(".", ""); // Remove period.
                        h     = pathh.Substring(0, 8);
                        string k;
                        string pathk = Path.GetRandomFileName();
                        pathk = pathk.Replace(".", ""); // Remove period.
                        k     = pathk.Substring(0, 8);
                        Teams[i].setCoachs(g, h, k, random.Next(0, 9999999), "Totenham", random.Next(0, 20));
                        Manager T = new Manager("Maroun", "Fatocheni", "3214123", 14);
                        Teams[i].addManager(T);
                    }
                }
                if (i == 3)
                {
                    Teams[i].SetStadium("Man City");
                    for (int j = 0; j < 15; j++)
                    {
                        if (j >= 0 && j < 2)
                        {
                            string a;
                            string patha = Path.GetRandomFileName();
                            patha = patha.Replace(".", ""); // Remove period.
                            a     = patha.Substring(0, 8);
                            string b;
                            string pathb = Path.GetRandomFileName();
                            pathb = pathb.Replace(".", ""); // Remove period.
                            b     = pathb.Substring(0, 8);
                            string c;
                            string pathc = Path.GetRandomFileName();
                            pathc = pathc.Replace(".", ""); // Remove period.
                            c     = pathb.Substring(0, 8);
                            Footballer x = new Footballer(a, b, c, random.Next(0, 26), "Liverpool", "GoalKeeper", random.Next(0, 38), random.Next(0, 32));
                            Teams[i].AddPlayer(x);
                            NumofWorkers++;
                        }
                        if (j >= 2 && j < 5)
                        {
                            string a;
                            string patha = Path.GetRandomFileName();
                            patha = patha.Replace(".", ""); // Remove period.
                            a     = patha.Substring(0, 8);
                            string b;
                            string pathb = Path.GetRandomFileName();
                            pathb = pathb.Replace(".", ""); // Remove period.
                            b     = pathb.Substring(0, 8);
                            string c;
                            string pathc = Path.GetRandomFileName();
                            pathc = pathc.Replace(".", ""); // Remove period.
                            c     = pathb.Substring(0, 8);
                            Footballer x = new Footballer(a, b, c, random.Next(0, 26), "Liverpool", "Striker", random.Next(0, 38), random.Next(0, 32));
                            Teams[i].AddPlayer(x);
                            NumofWorkers++;
                        }
                        if (j >= 5 && j < 9)
                        {
                            string a;
                            string patha = Path.GetRandomFileName();
                            patha = patha.Replace(".", ""); // Remove period.
                            a     = patha.Substring(0, 8);
                            string b;
                            string pathb = Path.GetRandomFileName();
                            pathb = pathb.Replace(".", ""); // Remove period.
                            b     = pathb.Substring(0, 8);
                            string c;
                            string pathc = Path.GetRandomFileName();
                            pathc = pathc.Replace(".", ""); // Remove period.
                            c     = pathb.Substring(0, 8);
                            Footballer x = new Footballer(a, b, c, random.Next(0, 26), "Liverpool", "midelfield", random.Next(0, 38), random.Next(0, 32));
                            Teams[i].AddPlayer(x);
                            NumofWorkers++;
                        }
                        if (j >= 9 && j < 12)
                        {
                            string a;
                            string patha = Path.GetRandomFileName();
                            patha = patha.Replace(".", ""); // Remove period.
                            a     = patha.Substring(0, 8);
                            string b;
                            string pathb = Path.GetRandomFileName();
                            pathb = pathb.Replace(".", ""); // Remove period.
                            b     = pathb.Substring(0, 8);
                            string c;
                            string pathc = Path.GetRandomFileName();
                            pathc = pathc.Replace(".", ""); // Remove period.
                            c     = pathb.Substring(0, 8);
                            Footballer x = new Footballer(a, b, c, random.Next(0, 26), "Liverpool", "FullBack", random.Next(0, 38), random.Next(0, 32));
                            Teams[i].AddPlayer(x);
                            NumofWorkers++;
                        }
                        if (j >= 12 && j < 15)
                        {
                            string a;
                            string patha = Path.GetRandomFileName();
                            patha = patha.Replace(".", ""); // Remove period.
                            a     = patha.Substring(0, 8);
                            string b;
                            string pathb = Path.GetRandomFileName();
                            pathb = pathb.Replace(".", ""); // Remove period.
                            b     = pathb.Substring(0, 8);
                            string c;
                            string pathc = Path.GetRandomFileName();
                            pathc = pathc.Replace(".", ""); // Remove period.
                            c     = pathb.Substring(0, 8);
                            Footballer x = new Footballer(a, b, c, random.Next(0, 26), "Liverpool", "Defender", random.Next(0, 38), random.Next(0, 32));
                            Teams[i].AddPlayer(x);
                            NumofWorkers++;
                        }
                        string g;
                        string pathg = Path.GetRandomFileName();
                        pathg = pathg.Replace(".", ""); // Remove period.
                        g     = pathg.Substring(0, 8);
                        string h;
                        string pathh = Path.GetRandomFileName();
                        pathh = pathh.Replace(".", ""); // Remove period.
                        h     = pathh.Substring(0, 8);
                        string k;
                        string pathk = Path.GetRandomFileName();
                        pathk = pathk.Replace(".", ""); // Remove period.
                        k     = pathk.Substring(0, 8);
                        Teams[i].setCoachs(g, h, k, random.Next(0, 9999999), "Liverpool", random.Next(0, 20));
                        Manager T = new Manager("Jorgen", "Klopp", "3214123", 14);
                        Teams[i].addManager(T);
                    }
                }
                if (i == 4)
                {
                    Teams[i].SetStadium("Eitahad");
                    for (int j = 0; j < 15; j++)
                    {
                        if (j >= 0 && j < 2)
                        {
                            string a;
                            string patha = Path.GetRandomFileName();
                            patha = patha.Replace(".", "");                 // Remove period.
                            a     = patha.Substring(0, 8);
                            string b;
                            string pathb = Path.GetRandomFileName();
                            pathb = pathb.Replace(".", "");                 // Remove period.
                            b     = pathb.Substring(0, 8);
                            string c;
                            string pathc = Path.GetRandomFileName();
                            pathc = pathc.Replace(".", "");                 // Remove period.
                            c     = pathb.Substring(0, 8);
                            Footballer x = new Footballer(a, b, c, random.Next(0, 26), "Man City", "GoalKeeper", random.Next(0, 38), random.Next(0, 32));
                            Teams[i].AddPlayer(x);
                            NumofWorkers++;
                        }
                        if (j >= 2 && j < 5)
                        {
                            string a;
                            string patha = Path.GetRandomFileName();
                            patha = patha.Replace(".", "");                 // Remove period.
                            a     = patha.Substring(0, 8);
                            string b;
                            string pathb = Path.GetRandomFileName();
                            pathb = pathb.Replace(".", "");                 // Remove period.
                            b     = pathb.Substring(0, 8);
                            string c;
                            string pathc = Path.GetRandomFileName();
                            pathc = pathc.Replace(".", "");                 // Remove period.
                            c     = pathb.Substring(0, 8);
                            Footballer x = new Footballer(a, b, c, random.Next(0, 26), "Man City", "Striker", random.Next(0, 38), random.Next(0, 32));
                            Teams[i].AddPlayer(x);
                            NumofWorkers++;
                        }
                        if (j >= 5 && j < 9)
                        {
                            string a;
                            string patha = Path.GetRandomFileName();
                            patha = patha.Replace(".", "");                 // Remove period.
                            a     = patha.Substring(0, 8);
                            string b;
                            string pathb = Path.GetRandomFileName();
                            pathb = pathb.Replace(".", "");                 // Remove period.
                            b     = pathb.Substring(0, 8);
                            string c;
                            string pathc = Path.GetRandomFileName();
                            pathc = pathc.Replace(".", "");                 // Remove period.
                            c     = pathb.Substring(0, 8);
                            Footballer x = new Footballer(a, b, c, random.Next(0, 26), "Man City", "midelfield", random.Next(0, 38), random.Next(0, 32));
                            Teams[i].AddPlayer(x);
                            NumofWorkers++;
                        }
                        if (j >= 9 && j < 12)
                        {
                            string a;
                            string patha = Path.GetRandomFileName();
                            patha = patha.Replace(".", "");                 // Remove period.
                            a     = patha.Substring(0, 8);
                            string b;
                            string pathb = Path.GetRandomFileName();
                            pathb = pathb.Replace(".", "");                 // Remove period.
                            b     = pathb.Substring(0, 8);
                            string c;
                            string pathc = Path.GetRandomFileName();
                            pathc = pathc.Replace(".", "");                 // Remove period.
                            c     = pathb.Substring(0, 8);
                            Footballer x = new Footballer(a, b, c, random.Next(0, 26), "Man City", "FullBack", random.Next(0, 38), random.Next(0, 32));
                            Teams[i].AddPlayer(x);
                            NumofWorkers++;
                        }
                        if (j >= 12 && j < 15)
                        {
                            string a;
                            string patha = Path.GetRandomFileName();
                            patha = patha.Replace(".", "");                 // Remove period.
                            a     = patha.Substring(0, 8);
                            string b;
                            string pathb = Path.GetRandomFileName();
                            pathb = pathb.Replace(".", "");                 // Remove period.
                            b     = pathb.Substring(0, 8);
                            string c;
                            string pathc = Path.GetRandomFileName();
                            pathc = pathc.Replace(".", "");                 // Remove period.
                            c     = pathb.Substring(0, 8);
                            Footballer x = new Footballer(a, b, c, random.Next(0, 26), "Man City", "Defender", random.Next(0, 38), random.Next(0, 32));
                            Teams[i].AddPlayer(x);
                            NumofWorkers++;
                        }
                        string g;
                        string pathg = Path.GetRandomFileName();
                        pathg = pathg.Replace(".", "");                 // Remove period.
                        g     = pathg.Substring(0, 8);
                        string h;
                        string pathh = Path.GetRandomFileName();
                        pathh = pathh.Replace(".", "");                 // Remove period.
                        h     = pathh.Substring(0, 8);
                        string k;
                        string pathk = Path.GetRandomFileName();
                        pathk = pathk.Replace(".", "");                 // Remove period.
                        k     = pathk.Substring(0, 8);
                        Teams[i].setCoachs(g, h, k, random.Next(0, 9999999), "Man City", random.Next(0, 20));
                        Manager T = new Manager("Pep", "Guardiola", "3214123", 14);
                        Teams[i].addManager(T);
                    }
                }
            }
            MakerTTi();
        }