public void advanceState(){
		switch(aamode){
			case 1: pete.advanceState(); break;
			case 2: for(int h = 0; h <= gridy-1; h++){
						for(int w = 0; w <= gridx-1; w++){
							grid[w][h].advanceState();}}	break;
						}
						refreshState();
					}