
import java.util.ArrayList;
import java.util.List;
import processing.core.PApplet;

public class Building {
  List <float []> coordList;
  PApplet p;


  public Building (PApplet parent) {
    p = parent;
    coordList = new ArrayList <float []>();
  }

  public void addPair(float x, float y) {
    float[] pair = new float [2];
    pair[0] = x;
    pair[1] = y;
    coordList.add(pair);
  }

  public List<float[]> getCoordList() {
    return coordList;
  }

  public void setCoordList(List<float[]> coordList) {
    this.coordList = coordList;
  }

  public void draw () {
    //p.println(coordList.size());
    for (int i = 0; i < coordList.size()-1; i++) {
      float [] n = coordList.get(i);
      float [] n1 = coordList.get(i+1);
      p.stroke (255);
      p.line(n[0], n[1], n1[0], n1[1]);
      //p.println(n[0] + " " + n[1]+ " " + n1[0]+ " " + n1[1] + "\n");
    }
  }
}

