There's no DNA constructor with an int-argument as it is called in the crossover-function. So this code failed to compile (when you're lazy like me and just copied and pasted it).
I just removed genes.length from the constructor at the instantiation of child.
P.S. thanks for that great work. It's a pleasure to read through it.
There's no DNA constructor with an int-argument as it is called in the crossover-function. So this code failed to compile (when you're lazy like me and just copied and pasted it). I just removed
genes.length
from the constructor at the instantiation ofchild
.P.S. thanks for that great work. It's a pleasure to read through it.