class gene { int id; gene child; int childID; int repeat; float heading; int rkey=0; float neuronWeight=0; boolean isNeuron=false; boolean isLightSensor=false; boolean isMuscle=false; // float muscleStrength=0; gene() { child=null; } gene(gene g) { id=g.id; childID=g.childID; repeat=g.repeat; child=g.child; heading=g.heading; neuronWeight=g.neuronWeight; rkey=g.rkey; switch(rkey) { case 0: break; case 1: isNeuron=true; break; case 2: isMuscle=true; break; case 3: isLightSensor=true; isNeuron=true; break; } } gene(int i,int r,float h,float nw,int rkey) { id=i; repeat=r; heading=h; neuronWeight=nw; child=null; this.rkey=rkey; switch(this.rkey) { case 0: break; case 1: isNeuron=true; break; case 2: isMuscle=true; break; case 3: isLightSensor=true; isNeuron=true; break; } } gene(int i,int r,gene g,float h) { id=i; repeat=r; child=new gene(g); heading=h; } }