nature-of-code / The-Nature-of-Code-archive

The very first build system for The Nature of Code
http://natureofcode.com
914 stars 151 forks source link

Fixed code error on p. 412 (DNA-class) #315

Closed mattiloh closed 10 years ago

mattiloh commented 11 years ago

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.

shiffman commented 10 years ago

I moved to a new repo and fixed this there https://github.com/shiffman/The-Nature-of-Code