improved mutation chance calculation
This commit is contained in:
@@ -151,7 +151,7 @@ class Organism {
|
|||||||
}
|
}
|
||||||
|
|
||||||
calcRandomChance(prob) {
|
calcRandomChance(prob) {
|
||||||
return (Math.random() * 100) <= prob;
|
return (Math.random() * 100) < prob;
|
||||||
}
|
}
|
||||||
|
|
||||||
attemptMove() {
|
attemptMove() {
|
||||||
|
|||||||
Reference in New Issue
Block a user