package speiger.src.coreengine.utils.counters.averager;

public class Counter {
	int value;
	int lastValue;
	
	public void add(int value) {
		this.value += value;
	}
	
	public void onFinished() {
		lastValue = value;
		value = 0;
	}
	
	public int get() { return lastValue; }
	
	public static Counter[] createCounters(int count) {
		Counter[] counters = new Counter[count];
		for(int i = 0;i < count;i++) {
			counters[i] = new Counter();
		}
		return counters;
	}
}
