neat-chrome-dinosaur icon indicating copy to clipboard operation
neat-chrome-dinosaur copied to clipboard

A Little Issue

Open nothoudaifa opened this issue 3 years ago • 1 comments

https://github.com/codewmax/neat-chrome-dinosaur/blob/169846d256d570b8141d4192f5b8739c52bdb634/main.py#L136

I Think you should move that line up before appending the genome to the List

nothoudaifa avatar Jul 22 '22 20:07 nothoudaifa

I made the same mistake as you have here: Genomes are mutable, so any changes to the genomes effect the "version" in the list as well as the one in the wild. it's all the same genome - it's similar to "pass by reference" vs "pass by value" in other programming languages.

MartinKlefas avatar May 12 '23 12:05 MartinKlefas