public Board(ArrayList<SimulatorRobot> r, String theme) {

        setDoubleBuffered(true);
        this.bullets = new Vector();
        this.deadRobots = new ArrayList();
        this.pills = new ArrayList();
        this.expAnim = new ArrayList();
        this.obstacles = new ArrayList();
        this.ovnis = new ArrayList();
        this.robots = r;
        this.theme = theme;

        for (int i = 0; i < robots.size(); i++) {
            if (robots.get(i) != null) {
                new Thread(robots.get(i)).start();
                pills.add(new HealthPill());
            }
        }

        numObstacles = 1;
        
        for(int i=0; i<numObstacles; i++){
           
            boolean in = false;
            while(!in){
                Obstacle obs = new Obstacle();
                Rectangle2D robstacle = new Rectangle((int)obs.getX(), (int)obs.getY(), obs.getWidth(), obs.getHeight());

                for(int c=0; c<Board.robots.size(); c++){

                    Rectangle2D rrobot = new Rectangle((int)Board.robots.get(c).getX(), (int)Board.robots.get(c).getY(), Board.robots.get(c).getWidth(), Board.robots.get(c).getHeight());

                    if(!rrobot.intersects(robstacle)){
                        obstacles.add(obs);
                        in = true;
                        return;
                    } 
                }
            }
        }

    }