@Override
	public void update() {
		if(++updateCount >= REGEN_TIME) {
			updateCount = 0;
			amount++;
			updateImage();
		}

		if(amount < 0) {
			getWorld().removeStructure(this);
		} else if(amount > SPREAD) {
			Set<Tile> neighbours = new HashSet<Tile>();
			neighbours.add(getWorld().getTile(getX()-1, getY()));
			neighbours.add(getWorld().getTile(getX()+1, getY()));
			neighbours.add(getWorld().getTile(getX(), getY()+1));
			neighbours.add(getWorld().getTile(getX(), getY()-1));
			neighbours.remove(null);

			if(neighbours.size() > 0) {
				List<Tile> list = new ArrayList<Tile>(neighbours);
				Collections.shuffle(list);
				Tile t = list.get(0);
				if(t.getStructure() == null && t.getHeight() == getWorld().getTile(getX(),getY()).getHeight()) {
					getWorld().addStructure(new Crystal(t.getX(), t.getY()));
					amount = HALF;
				}
			}

			updateImage();
		}

		if(amount >= MAX)
			shouldOctoMine = true;
		if(amount <= MIN/2)
			shouldOctoMine = false;
	}