Beispiel #1
0
        void CreateRoom(bool botsEnabled)
        {
            NationTeam[] nationTeam = new NationTeam[2];
            nationTeam[0] = GetNationData(-1);

            while (true)
            {
                nationTeam[1] = GetNationData(nationTeam[0].nID);
                if (nationTeam[1].nID > -1 && nationTeam[0].shirtType != nationTeam[1].shirtType)
                {
                    break;
                }
            }


            TeamData[] teams = new TeamData[2];

            for (int i = 0; i < 2; i++)
            {
                teams[i] = new TeamData(false, -1, nationTeam[i].name, nationTeam[i].shortName, nationTeam[i].shirtStyle, nationTeam[i].shirtColors);
            }

            lock (rooms)
            {
                rooms.Add(new RoomData(false, 0, server, clientToMS, RoomType.Public, GetUniqueID(), teams[0], teams[1], botsEnabled, 6));
            }
        }
Beispiel #2
0
        NationTeam GetNationData(int nationToSkip)
        {
            NationTeam result = new NationTeam();

            int i = F.rand.Next(1, 23);   //1-22

            if (nationToSkip > -1)
            {
                if (i == nationToSkip)
                {
                    result.nID = -1;
                    return(result);
                }
            }

            #region nations

            /*
             * Argentina
             * Australia
             * Brazil
             * Chile
             * England
             * Finland
             * France
             * Germany
             * Ghana
             * Greece
             * Holland
             * Italy
             * Ivory coast
             * Japan
             * Norway
             * Poland
             * Portugal
             * Russia
             * Spain
             * Sweden
             * Uruguay
             * USA
             */

            if (i == 1)
            {
                result.name              = "Argentina";
                result.shortName         = "ARG";
                result.shirtStyle        = 1;
                result.shirtType         = 0; //1=bright, 2=dark
                result.shirtColors[0, 0] = 106;
                result.shirtColors[0, 1] = 181;
                result.shirtColors[0, 2] = 255;

                result.shirtColors[1, 0] = 255;
                result.shirtColors[1, 1] = 255;
                result.shirtColors[1, 2] = 255;

                result.shirtColors[2, 0] = 0;
                result.shirtColors[2, 1] = 0;
                result.shirtColors[2, 2] = 0;

                result.shirtColors[3, 0] = 255;
                result.shirtColors[3, 1] = 255;
                result.shirtColors[3, 2] = 255;
            }

            if (i == 2)
            {
                result.name              = "Brazil";
                result.shortName         = "BRA";
                result.shirtStyle        = 0;
                result.shirtType         = 0; //1=bright, 2=dark
                result.shirtColors[0, 0] = 255;
                result.shirtColors[0, 1] = 218;
                result.shirtColors[0, 2] = 0;

                result.shirtColors[2, 0] = 0;
                result.shirtColors[2, 1] = 96;
                result.shirtColors[2, 2] = 191;

                result.shirtColors[3, 0] = 255;
                result.shirtColors[3, 1] = 255;
                result.shirtColors[3, 2] = 255;
            }

            if (i == 3)
            {
                result.name              = "Finland";
                result.shortName         = "FIN";
                result.shirtStyle        = 0;
                result.shirtType         = 0; //1=bright, 2=dark
                result.shirtColors[0, 0] = 255;
                result.shirtColors[0, 1] = 255;
                result.shirtColors[0, 2] = 255;

                result.shirtColors[2, 0] = 0;
                result.shirtColors[2, 1] = 0;
                result.shirtColors[2, 2] = 255;

                result.shirtColors[3, 0] = 255;
                result.shirtColors[3, 1] = 255;
                result.shirtColors[3, 2] = 255;
            }

            if (i == 4)
            {
                result.name              = "Sweden";
                result.shortName         = "SWE";
                result.shirtStyle        = 0;
                result.shirtType         = 0; //1=bright, 2=dark
                result.shirtColors[0, 0] = 255;
                result.shirtColors[0, 1] = 255;
                result.shirtColors[0, 2] = 0;

                result.shirtColors[2, 0] = 0;
                result.shirtColors[2, 1] = 0;
                result.shirtColors[2, 2] = 255;

                result.shirtColors[3, 0] = 255;
                result.shirtColors[3, 1] = 255;
                result.shirtColors[3, 2] = 0;
            }

            if (i == 5)
            {
                result.name              = "Spain";
                result.shortName         = "SPA";
                result.shirtStyle        = 0;
                result.shirtType         = 1; //1=bright, 2=dark
                result.shirtColors[0, 0] = 255;
                result.shirtColors[0, 1] = 0;
                result.shirtColors[0, 2] = 0;

                result.shirtColors[2, 0] = 0;
                result.shirtColors[2, 1] = 0;
                result.shirtColors[2, 2] = 129;

                result.shirtColors[3, 0] = 255;
                result.shirtColors[3, 1] = 0;
                result.shirtColors[3, 2] = 0;
            }

            if (i == 6)
            {
                result.name              = "Holland";
                result.shortName         = "HOL";
                result.shirtStyle        = 0;
                result.shirtType         = 1; //1=bright, 2=dark
                result.shirtColors[0, 0] = 255;
                result.shirtColors[0, 1] = 128;
                result.shirtColors[0, 2] = 0;

                result.shirtColors[2, 0] = 255;
                result.shirtColors[2, 1] = 255;
                result.shirtColors[2, 2] = 255;

                result.shirtColors[3, 0] = 255;
                result.shirtColors[3, 1] = 128;
                result.shirtColors[3, 2] = 0;
            }

            if (i == 7)
            {
                result.name              = "Germany";
                result.shortName         = "GER";
                result.shirtStyle        = 0;
                result.shirtType         = 0; //1=bright, 2=dark
                result.shirtColors[0, 0] = 255;
                result.shirtColors[0, 1] = 255;
                result.shirtColors[0, 2] = 255;

                result.shirtColors[2, 0] = 0;
                result.shirtColors[2, 1] = 0;
                result.shirtColors[2, 2] = 0;

                result.shirtColors[3, 0] = 255;
                result.shirtColors[3, 1] = 255;
                result.shirtColors[3, 2] = 255;
            }

            if (i == 8)
            {
                result.name              = "England";
                result.shortName         = "ENG";
                result.shirtStyle        = 0;
                result.shirtType         = 0; //1=bright, 2=dark
                result.shirtColors[0, 0] = 255;
                result.shirtColors[0, 1] = 255;
                result.shirtColors[0, 2] = 255;

                result.shirtColors[2, 0] = 255;
                result.shirtColors[2, 1] = 255;
                result.shirtColors[2, 2] = 255;

                result.shirtColors[3, 0] = 255;
                result.shirtColors[3, 1] = 255;
                result.shirtColors[3, 2] = 255;
            }

            if (i == 9)
            {
                result.name              = "Uruguay";
                result.shortName         = "URU";
                result.shirtStyle        = 0;
                result.shirtType         = 0; //1=bright, 2=dark
                result.shirtColors[0, 0] = 112;
                result.shirtColors[0, 1] = 169;
                result.shirtColors[0, 2] = 226;

                result.shirtColors[2, 0] = 0;
                result.shirtColors[2, 1] = 0;
                result.shirtColors[2, 2] = 0;

                result.shirtColors[3, 0] = 0;
                result.shirtColors[3, 1] = 0;
                result.shirtColors[3, 2] = 0;
            }

            if (i == 10)
            {
                result.name              = "Portugal";
                result.shortName         = "POR";
                result.shirtStyle        = 0;
                result.shirtType         = 1; //1=bright, 2=dark
                result.shirtColors[0, 0] = 255;
                result.shirtColors[0, 1] = 0;
                result.shirtColors[0, 2] = 0;

                result.shirtColors[2, 0] = 255;
                result.shirtColors[2, 1] = 0;
                result.shirtColors[2, 2] = 0;

                result.shirtColors[3, 0] = 255;
                result.shirtColors[3, 1] = 0;
                result.shirtColors[3, 2] = 0;
            }

            if (i == 11)
            {
                result.name              = "Italy";
                result.shortName         = "ITA";
                result.shirtStyle        = 0;
                result.shirtType         = 1; //1=bright, 2=dark
                result.shirtColors[0, 0] = 0;
                result.shirtColors[0, 1] = 0;
                result.shirtColors[0, 2] = 255;

                result.shirtColors[2, 0] = 255;
                result.shirtColors[2, 1] = 255;
                result.shirtColors[2, 2] = 255;

                result.shirtColors[3, 0] = 0;
                result.shirtColors[3, 1] = 0;
                result.shirtColors[3, 2] = 255;
            }

            if (i == 12)
            {
                result.name              = "Norway";
                result.shortName         = "NOR";
                result.shirtStyle        = 0;
                result.shirtType         = 1; //1=bright, 2=dark
                result.shirtColors[0, 0] = 255;
                result.shirtColors[0, 1] = 0;
                result.shirtColors[0, 2] = 0;

                result.shirtColors[2, 0] = 255;
                result.shirtColors[2, 1] = 255;
                result.shirtColors[2, 2] = 255;

                result.shirtColors[3, 0] = 32;
                result.shirtColors[3, 1] = 48;
                result.shirtColors[3, 2] = 96;
            }

            if (i == 13)
            {
                result.name              = "Greece";
                result.shortName         = "GRE";
                result.shirtStyle        = 0;
                result.shirtType         = 0; //1=bright, 2=dark
                result.shirtColors[0, 0] = 255;
                result.shirtColors[0, 1] = 255;
                result.shirtColors[0, 2] = 255;

                result.shirtColors[2, 0] = 255;
                result.shirtColors[2, 1] = 255;
                result.shirtColors[2, 2] = 255;

                result.shirtColors[3, 0] = 255;
                result.shirtColors[3, 1] = 255;
                result.shirtColors[3, 2] = 255;
            }

            if (i == 14)
            {
                result.name              = "Chile";
                result.shortName         = "CHI";
                result.shirtStyle        = 0;
                result.shirtType         = 1; //1=bright, 2=dark
                result.shirtColors[0, 0] = 255;
                result.shirtColors[0, 1] = 0;
                result.shirtColors[0, 2] = 0;

                result.shirtColors[2, 0] = 0;
                result.shirtColors[2, 1] = 0;
                result.shirtColors[2, 2] = 255;

                result.shirtColors[3, 0] = 255;
                result.shirtColors[3, 1] = 255;
                result.shirtColors[3, 2] = 255;
            }

            if (i == 15)
            {
                result.name              = "Japan";
                result.shortName         = "JPN";
                result.shirtStyle        = 0;
                result.shirtType         = 1; //1=bright, 2=dark
                result.shirtColors[0, 0] = 0;
                result.shirtColors[0, 1] = 0;
                result.shirtColors[0, 2] = 64;

                result.shirtColors[2, 0] = 0;
                result.shirtColors[2, 1] = 0;
                result.shirtColors[2, 2] = 64;

                result.shirtColors[3, 0] = 0;
                result.shirtColors[3, 1] = 0;
                result.shirtColors[3, 2] = 64;
            }

            if (i == 16)
            {
                result.name              = "Ghana";
                result.shortName         = "GHA";
                result.shirtStyle        = 0;
                result.shirtType         = 0; //1=bright, 2=dark
                result.shirtColors[0, 0] = 255;
                result.shirtColors[0, 1] = 255;
                result.shirtColors[0, 2] = 255;

                result.shirtColors[2, 0] = 255;
                result.shirtColors[2, 1] = 255;
                result.shirtColors[2, 2] = 255;

                result.shirtColors[3, 0] = 255;
                result.shirtColors[3, 1] = 255;
                result.shirtColors[3, 2] = 255;
            }

            if (i == 17)
            {
                result.name              = "Russia";
                result.shortName         = "RUS";
                result.shirtStyle        = 0;
                result.shirtType         = 1; //1=bright, 2=dark
                result.shirtColors[0, 0] = 255;
                result.shirtColors[0, 1] = 0;
                result.shirtColors[0, 2] = 0;

                result.shirtColors[2, 0] = 255;
                result.shirtColors[2, 1] = 0;
                result.shirtColors[2, 2] = 0;

                result.shirtColors[3, 0] = 255;
                result.shirtColors[3, 1] = 0;
                result.shirtColors[3, 2] = 0;
            }

            if (i == 18)
            {
                result.name              = "France";
                result.shortName         = "FRA";
                result.shirtStyle        = 0;
                result.shirtType         = 1; //1=bright, 2=dark
                result.shirtColors[0, 0] = 0;
                result.shirtColors[0, 1] = 0;
                result.shirtColors[0, 2] = 128;

                result.shirtColors[2, 0] = 255;
                result.shirtColors[2, 1] = 255;
                result.shirtColors[2, 2] = 255;

                result.shirtColors[3, 0] = 255;
                result.shirtColors[3, 1] = 0;
                result.shirtColors[3, 2] = 0;
            }

            if (i == 19)
            {
                result.name              = "Australia";
                result.shortName         = "AUS";
                result.shirtStyle        = 0;
                result.shirtType         = 0; //1=bright, 2=dark
                result.shirtColors[0, 0] = 255;
                result.shirtColors[0, 1] = 190;
                result.shirtColors[0, 2] = 0;

                result.shirtColors[2, 0] = 0;
                result.shirtColors[2, 1] = 64;
                result.shirtColors[2, 2] = 68;

                result.shirtColors[3, 0] = 255;
                result.shirtColors[3, 1] = 190;
                result.shirtColors[3, 2] = 0;
            }

            if (i == 20)
            {
                result.name              = "Ivory coast";
                result.shortName         = "IVO";
                result.shirtStyle        = 0;
                result.shirtType         = 1; //1=bright, 2=dark
                result.shirtColors[0, 0] = 255;
                result.shirtColors[0, 1] = 128;
                result.shirtColors[0, 2] = 0;

                result.shirtColors[2, 0] = 255;
                result.shirtColors[2, 1] = 128;
                result.shirtColors[2, 2] = 0;

                result.shirtColors[3, 0] = 255;
                result.shirtColors[3, 1] = 128;
                result.shirtColors[3, 2] = 0;
            }

            if (i == 21)
            {
                result.name              = "USA";
                result.shortName         = "USA";
                result.shirtStyle        = 0;
                result.shirtType         = 0; //1=bright, 2=dark
                result.shirtColors[0, 0] = 255;
                result.shirtColors[0, 1] = 255;
                result.shirtColors[0, 2] = 255;

                result.shirtColors[2, 0] = 255;
                result.shirtColors[2, 1] = 255;
                result.shirtColors[2, 2] = 255;

                result.shirtColors[3, 0] = 255;
                result.shirtColors[3, 1] = 255;
                result.shirtColors[3, 2] = 255;
            }

            if (i == 22)
            {
                result.name              = "Poland";
                result.shortName         = "POL";
                result.shirtStyle        = 0;
                result.shirtType         = 0; //1=bright, 2=dark
                result.shirtColors[0, 0] = 255;
                result.shirtColors[0, 1] = 255;
                result.shirtColors[0, 2] = 255;

                result.shirtColors[2, 0] = 255;
                result.shirtColors[2, 1] = 0;
                result.shirtColors[2, 2] = 0;

                result.shirtColors[3, 0] = 255;
                result.shirtColors[3, 1] = 255;
                result.shirtColors[3, 2] = 255;
            }
            #endregion

            result.nID = i;
            return(result);
        }