shuffleShapes() private method

private shuffleShapes ( ) : void
return void
Ejemplo n.º 1
0
 public void breed(DnaDrawing other)
 {
     lock (this)
     {
         lock (other)
         {
             shuffleShapes();
             other.shuffleShapes();
             List <DnaShape> otherFirst = other.firstHalf;
             List <DnaShape> otherSnd   = other.secondHalf;
             List <DnaShape> thisFirst  = firstHalf;
             List <DnaShape> thisSnd    = secondHalf;
             otherFirst.AddRange(thisSnd);
             thisFirst.AddRange(otherSnd);
             Shapes       = thisFirst;
             other.Shapes = otherFirst;
         }
     }
 }
Ejemplo n.º 2
0
 public void breed(DnaDrawing other)
 {
     lock (this)
     {
         lock (other)
         {
             shuffleShapes();
             other.shuffleShapes();
             List<DnaShape> otherFirst = other.firstHalf;
             List<DnaShape> otherSnd = other.secondHalf;
             List<DnaShape> thisFirst = firstHalf;
             List<DnaShape> thisSnd = secondHalf;
             otherFirst.AddRange(thisSnd);
             thisFirst.AddRange(otherSnd);
             Shapes = thisFirst;
             other.Shapes = otherFirst;
         }
     }
 }