public void drawObjects(Graphics2D g, Iterable<GameObject> objs) {
        double minx = center.x - Constants.FRAME_WIDTH /2.0;
        double maxx = center.x + Constants.FRAME_WIDTH /2.0;
        double miny = center.y - Constants.FRAME_HEIGHT /2.0;
        double maxy = center.y + Constants.FRAME_HEIGHT /2.0;
        Rectangle2D screen = new Rectangle2D.Double(minx, miny, maxx-minx, maxy-miny);
        for (GameObject obj: objs) {
            Vector2D s0 = new Vector2D(obj.s);
            Vector2D s = obj.s;
            if (s.x < minx) s.add(Constants.WORLD_WIDTH, 0);
            else if (s.x > maxx) s.add(-Constants.WORLD_WIDTH, 0);
            if (s.y < miny) s.add(0, Constants.WORLD_HEIGHT);
            else if (s.y > maxy) s.add(0, -Constants.WORLD_HEIGHT);
            if(obj.getBounds2D().intersects(screen)) obj.draw(g);
            obj.s = s0;
        }
    }