class gene { int id; gene child; gene parent=null; int childID=-1; int repeat; float heading; float distance; int rkey=0; float neuronWeight=0; float neuronPower=0; boolean isNeuron=false; boolean bidirectional=false; boolean isLightSensor=false; boolean isMuscle=false; boolean usedInPhenotype; // float muscleStrength=0; gene() { child=null; } gene(gene g) { id=g.id; childID=g.childID; parent=g.parent; repeat=g.repeat; child=g.child; heading=g.heading; neuronWeight=g.neuronWeight; neuronPower=g.neuronPower; bidirectional=g.bidirectional; rkey=g.rkey; distance=g.distance; 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 d,float nw,float np,boolean b,int rkey) { id=i; repeat=r; distance=d; heading=h; neuronWeight=nw; neuronPower=np; bidirectional=b; 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; } }