private void calculate(){
			switch(inmode){
				case 0: break;
				case 1: if(neighborstate[0] == 1){active = true; state = 1;}else{active = false; state = 0;}break;
				case 2: state = neighborstate[0]; if(state < 1){active = false;} else{active = true;}break;
				default:state = neighborstate[0]; if(state < 1){active = false;} else{active = true;} break;}
			}