Beispiel #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            string x, y, z;
            int    u, d, h;

            Console.WriteLine("Enter Refferee First Name");
            x = Console.ReadLine();
            Console.WriteLine("Enter Refferee Last Name");
            y = Console.ReadLine();
            Console.WriteLine("Enter Refferee id");
            z = Console.ReadLine();
            Console.WriteLine("Enter Refferee Carrier Time");
            string m, n, k;

            m = Console.ReadLine();
            u = Int32.Parse(m);
            Console.WriteLine("Enter Refferee Num Of Games");
            n = Console.ReadLine();
            d = Int32.Parse(n);
            Console.WriteLine("Enter Refferee Num Of mistakes");
            k = Console.ReadLine();
            h = Int32.Parse(k);
            Refferee NewRefferee = new Refferee(x, y, z, u, d, h);

            Refferee[] temp;
            temp = new Refferee[MyLeague.ReffereeNum + 1];
            for (int i = 0; i < MyLeague.ReffereeNum; i++)
            {
                temp[i] = MyLeague.Refferees[i];
            }
            MyLeague.ReffereeNum++;
            MyLeague.Refferees             = new Refferee[MyLeague.ReffereeNum];
            temp[MyLeague.ReffereeNum - 1] = NewRefferee;
            for (int i = 0; i < MyLeague.ReffereeNum; i++)
            {
                MyLeague.Refferees[i] = temp[i];
            }
            Console.WriteLine("Refferee Added you can back to the menu");
            return;
        }
        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();
        }