public void Init()
 {
     //initialise DNA
     //0 forward
     //1 Angle turn
     dna           = new DNAMazeChallenge(DNALength, 360);
     startPosition = this.transform.position;
 }
Beispiel #2
0
 public void Combine(DNAMazeChallenge d1, DNAMazeChallenge d2)
 {
     for (int i = 0; i < dnaLength; i++)
     {
         if (i < dnaLength / 2.0)
         {
             int c = d1.genes[i];
             genes[i] = c;
         }
         else
         {
             int c = d2.genes[i];
             genes[i] = c;
         }
     }
 }