I don't think the crossover code works correctly at all:
I set up this test:
Private Sub MDIForm_Load()
'debug
Randomize
Do
Dim dna1(9) As block
Dim dna2(11) As block
ReDim rob(1)
dna1(0).value = 100
dna1(1).value = 200
dna1(2).value = 300
dna1(3).value = 400
dna1(4).value = 500
dna1(5).value = 600
dna1(6).value = 700
dna1(7).value = 800
dna1(8).value = 900
'
dna1(9).value = 1
dna1(9).tipo = 10
dna2(0).value = 111
dna2(1).value = 2
dna2(2).value = 3
dna2(3).value = 4
dna2(4).value = 400
dna2(5).value = 500
dna2(6).value = 600
dna2(7).value = 8
dna2(8).value = 9
dna2(9).value = 10
dna2(10).value = 11
'
dna2(11).value = 1
dna2(11).tipo = 10
rob(0).DNA = dna1
rob(0).DnaLen = DnaLen(rob(0).DNA)
rob(0).spermDNA = dna2
rob(0).spermDNAlen = DnaLen(rob(0).spermDNA)
Crossover 0, 1
Dim i As Integer
For i = 0 To UBound(rob(1).DNA)
MsgBox rob(1).DNA(i).value
Next
MsgBox "reset"
Loop
'debug
and it is ether returning the DNA or the SpermDNA
it should be returning one of the four below:
111,2,3,4,400,500,600,700,800,900,1
100,200,300,400,500,600,8,9,10,11,1
it is only returning:
100,200,300,400,500,600,700,800,900,1
or
111,2,3,4,400,500,600,8,9,10,11,1
is this output wrong or am I missing a step?