package spirale;

public class Fibonacci implements Generator{
	private int last1 = 0, last2 = 0;

	public int next(){
		int tmp = last1 + last2;
		if(tmp == 0){
			tmp = 1;
		}
		last2 = last1;
		last1 = tmp;
		return tmp;
	}
}
