public class Map {
  private ArrayList<PVector> MapPoints;
  int noPoints = 10;
  Map(int w, int h) {
    MapPoints = new ArrayList<PVector>();
    //MapPoints.add(random(w),random(h));
    for (int i = 0; i < noPoints; i++) {
      // make sure minimum distance from all point
      float angle = PI*2/noPoints;
      angle*=i;
      PVector point =  new PVector(sin(angle), cos(angle));
      point.mult((w*.4)+random(-40,40));
      point.add(gameW/2,gameH/2); // place in center
      MapPoints.add(point);
    }
  }

  public void draw() {
    noFill();
    strokeWeight(50);
    stroke(255);
    beginShape();
    PVector point =  MapPoints.get(0);
    curveVertex(point.x, point.y);
    for (int i = 0; i < MapPoints.size(); i++) {
      point =  MapPoints.get(i);
      curveVertex(point.x, point.y);
    }
    point =  MapPoints.get(0);
    curveVertex(point.x, point.y);

    point =  MapPoints.get(1);
    curveVertex(point.x, point.y);

    endShape(CLOSE);
  }

}
