Esempio n. 1
0
        private void initWindows()
        {
            // diferencia x = 49
            // diferencia y = -74
            int posX = 283;
            int posY = 488;
            int i    = 0;

            for (int y = 0; y < ROW; y++)
            {
                for (int x = 0; x < COL; x++)
                {
                    if ((posX != 381 && posY != 488) || (posX != 381 && posY != 417) || posY == 340)
                    {
                        windows[i] = new TwoPanels(posX, posY, false);
                    }

                    if (posY == 488 && posX == 381)
                    {
                        windows[i] = new Door(369, 468);
                    }

                    if (posY == 414 && posX == 381)
                    {
                        windows[i] = new Semicircular(369, 413);
                    }

                    i++;
                    posX += 49;
                }
                posX  = 283;
                posY -= 74;
            }
        }
Esempio n. 2
0
 private void setWithoutObstacles(int posX, int posY, int i)
 {
     if (util.Random.boolValue(5) && doubleDoorCounter < MAX_DOUBLE_DOOR)
     {
         windows[i] = new DoubleDoor(posX, posY);
         doubleDoorCounter++;
     }
     else
     {
         windows[i] = new TwoPanels(posX, posY, false);
     }
 }
Esempio n. 3
0
 private void setWithObstacles(int posX, int posY, int i)
 {
     if (util.Random.boolValue(5) && doubleDoorCounter < MAX_DOUBLE_DOOR)
     {
         bool hasObstacle = util.Random.boolValue(6);
         if (hasObstacle)
         {
             obsCounter++;
         }
         windows[i] = new DoubleDoor(posX, posY);
         doubleDoorCounter++;
     }
     else
     {
         bool hasObstacle = util.Random.boolValue(5);
         if (hasObstacle)
         {
             obsCounter++;
         }
         windows[i] = new TwoPanels(posX, posY, hasObstacle);
     }
 }