Exemplo n.º 1
0
        public GreekBoard()
        {
            Random r   = new Random();
            int    num = 0;

            for (int i = 0; i < 16; i++)
            {
                ProductionTile pt = new ProductionTile();

                num = r.Next(0, 15);
                if (num == 0 || num == 1 || num == 2 || num == 3)
                {
                    pt.type           = "Hills";
                    pt.displayPicture = Image.FromFile(@"C:\AgeOfMythology\Resources\Tiles\norse\tiles\hills1.png");
                    hillCount++;
                }
                else if (num == 4)
                {
                    pt.type           = "Desert";
                    pt.displayPicture = Image.FromFile(@"C:\AgeOfMythology\Resources\Tiles\norse\tiles\desert1.png");
                    desertCount++;
                }
                else if (num == 5 || num == 6)
                {
                    pt.type           = "Swamp";
                    pt.displayPicture = Image.FromFile(@"C:\AgeOfMythology\Resources\Tiles\norse\tiles\swamp1.png");
                    swampCount++;
                }
                else if (num == 7 || num == 8 || num == 9)
                {
                    pt.type           = "Forest";
                    pt.displayPicture = Image.FromFile(@"C:\AgeOfMythology\Resources\Tiles\norse\tiles\forest1.png");
                    forestCount++;
                }
                else if (num == 10 || num == 11 || num == 12 || num == 13)
                {
                    pt.type           = "Fertile";
                    pt.displayPicture = Image.FromFile(@"C:\AgeOfMythology\Resources\Tiles\norse\tiles\fertile1.png");
                    fertileCount++;
                }
                else
                {
                    pt.type           = "Mountains";
                    pt.displayPicture = Image.FromFile(@"C:\AgeOfMythology\Resources\Tiles\norse\tiles\mountains1.png");
                    mountainCount++;
                }
                tiles[i] = pt;
            }
        }
Exemplo n.º 2
0
        public EgyptianBoard()
        {
            Random r   = new Random();
            int    num = 0;

            for (int i = 0; i < 16; i++)
            {
                ProductionTile pt = new ProductionTile();

                num = r.Next(0, 15);
                if (num == 0 || num == 1 || num == 2)
                {
                    pt.type           = "Desert";
                    pt.displayPicture = Image.FromFile(@"C:\Users\Thomas\OneDrive\Projects\CSULB\AgeOfMythology\Resources\Tiles\norse\tiles\desert1.png");
                    desertCount++;
                }
                else if (num == 3)
                {
                    pt.type           = "Mountains";
                    pt.displayPicture = Image.FromFile(@"C:\Users\Thomas\OneDrive\Projects\CSULB\AgeOfMythology\Resources\Tiles\norse\tiles\mountains1.png");
                    mountainCount++;
                }
                else if (num == 4 || num == 5)
                {
                    pt.type           = "Swamp";
                    pt.displayPicture = Image.FromFile(@"C:\Users\Thomas\OneDrive\Projects\CSULB\AgeOfMythology\Resources\Tiles\norse\tiles\swamp1.png");
                    swampCount++;
                }
                else if (num == 6 || num == 7 || num == 8)
                {
                    pt.type           = "Forest";
                    pt.displayPicture = Image.FromFile(@"C:\Users\Thomas\OneDrive\Projects\CSULB\AgeOfMythology\Resources\Tiles\norse\tiles\forest1.png");
                    forestCount++;
                }
                else if (num == 9 || num == 10 || num == 11 || num == 12)
                {
                    pt.type           = "Fertile";
                    pt.displayPicture = Image.FromFile(@"C:\Users\Thomas\OneDrive\Projects\CSULB\AgeOfMythology\Resources\Tiles\norse\tiles\fertile1.png");
                    fertileCount++;
                }
                else
                {
                    pt.type           = "Hills";
                    pt.displayPicture = Image.FromFile(@"C:\Users\Thomas\OneDrive\Projects\CSULB\AgeOfMythology\Resources\Tiles\norse\tiles\hills1.png");
                    hillCount++;
                }
                tiles[i] = pt;
            }
        }