ArrayList<Client> sibs = new ArrayList<Client>();
while(job.getCase().getClients().size()<10 && sibs.size()==0 || chance(40)){
Client child = genClient(job, ageParent-15);
sibs.add(child);
Relationship r = new Relationship();
job.getCase().getRelationships().add(r);
r.setSource(parent);
r.setTarget(child);
r.setType("parent");
r = new Relationship();
job.getCase().getRelationships().add(r);
r.setSource(child);
r.setTarget(parent);
r.setType("child");
}
for(Client sib1 : sibs){
for(Client sib2 : sibs ){
if(sib1 != sib2){
Relationship r = new Relationship();
job.getCase().getRelationships().add(r);
r.setSource(sib1);
r.setTarget(sib2);
r.setType("sibling");
}
}
}
}