Miscellany
public text v1 · immutable public void copyInto(Colony newColony, int row, int col, boolean overwrite)
{
for(int i = 0; i < newColony.getHeight(); i++) {
if((i > -1) && (i < this.getHeight())) {
for(int j = 0; j < newColony.getWidth(); j++) {
if((j > -1) && (j < this.getWidth())) {
if(this.getCell(i,j)) {
newColony.setCell(row+i, col+j, true);
}
else {
if(overwrite) {
newColony.setCell(row+i, col+j, false);
}
}
}
}
}
}
}