Added some birth distance stuff

This commit is contained in:
MaxRobinsonTheGreat
2020-08-04 15:10:13 -06:00
parent ef1d78d755
commit f3fc6813a0
4 changed files with 8 additions and 1 deletions

View File

@@ -189,6 +189,8 @@ class Organism {
}
if (Math.random() * 100 <= 10) {
this.birth_distance += Math.floor(Math.random() * 4) - 2;
if (this.birth_distance < 1)
this.birth_distance = 1;
}
return mutated;
}