Fix WeightedRandomize.js

This commit is contained in:
Hal Helms 2018-01-09 22:26:02 -08:00 committed by GitHub
parent 42ad0ac399
commit 89e4289c9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,6 +53,7 @@ var WeightedRandomize = function (tileX, tileY, width, height, weightedIndexes,
randomIndex = Array.isArray(chosen) randomIndex = Array.isArray(chosen)
? chosen[Math.floor(Math.random() * chosen.length)] ? chosen[Math.floor(Math.random() * chosen.length)]
: chosen; : chosen;
break;
} }
} }