So I'm making a small natural-selection sim and need to make offspring inherit variables values from parents.
However, I have no clue how to do it. The biggest obstacle is instance selecting, since the way (I hope) the inheritance goes is that for each stat (speed, sight, etc) it would pick one of the parent to inherit that from (so if one parent has a speed of 150 and the other 170, the offspring has a 50/50 chance for 170, repeat for other stats). However, how would I pick between parent A, parent B, and the offspring?
Or would it be easier to convert it to a sort of mitosis, where the parent just duplicates?
Thanks in advance.