public void Swap()
{
var root_gene = this.Gene as NoteGene;
if (this.Children != null)
{
if (this.Children.Count > 1)
{
var child1 = this.Children[0];
var child2 = this.Children[1];
var temp = child2;
child2 = child1;
child1 = temp;
if (child2 != null)
child2.Swap();
if (child1 != null)
child1.Swap();
}
}
}