public void addRenter(PersonAgent rp) { ResidentAgent r = new ResidentAgent("renter " + renters.size(), type, renters.size()); r.setHousing(this); panel.addRenter(r, type, renters.size()); renters.add(new Renter(r, rp, renters.size())); }
public void addRenter() { // hack ResidentAgent r = new ResidentAgent("renter " + renters.size(), type, renters.size()); r.setHousing(this); panel.addRenter(r, type, renters.size()); renters.add(new Renter(r, null, renters.size())); }