Public feed #959391

Miscellany

public text v1 · immutable
Raw Edit
·published 2008-03-27 12:35 UTC
rendered paste body
	public void setDimensions(int height, int width) {
		
		boolean changed = false;
		
		if (this.colony != null) {
			changed = (this.getHeight() == height && this.getWidth() == width) ? false : true;
		}
 		
		this.colony = createColony(height, width);
		this.nextColony = createColony(height, width);
		
		if (changed) {
			for (GameOfLifeListener listener : this.golListeners) {
				listener.colonyDimensionsChanged(height, width);
			}
		}
		
	}