All pastes #959391 Raw Edit

Miscellany

public text v1 · immutable
#959391 ·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);
			}
		}
		
	}