Fixed random freeze from routing calculating permutations it shouldn't

This commit is contained in:
thepaperpilot 2022-12-24 10:04:16 -06:00
parent 185ef6cbb2
commit e42e9d023e

View file

@ -79,7 +79,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
const currentRoutes = computed(() => {
// Manually check milestone req here due to calling generateCity() before milestones get earned
if (Decimal.gte(citiesCompleted.value, 7)) {
if (Decimal.gte(citiesCompleted.value, 7) || currentCity.value.length >= 12) {
return Decimal.factorial(currentCity.value.length).div(2).toNumber();
}
// Permutation code from https://stackoverflow.com/a/37580979