Apply suggestions from code review

Co-Authored-By: garnet420 <795869+garnet420@users.noreply.github.com>
This commit is contained in:
Andrei Andreev 2019-04-01 11:05:10 -04:00 committed by garnet420
parent ea989e721d
commit f1b3a7d2dd
2 changed files with 4 additions and 4 deletions

View File

@ -22,8 +22,8 @@ class Galaxy {
/**
* Figure out what galaxy number we can buy up to
* @param {number} currency Either dim 8 or dim 6, depending
* @returns {number} max number of galaxies (total)
* @param {number} currency Either dim 8 or dim 6, depends on current challenge
* @returns {number} Max number of galaxies (total)
*/
static buyableGalaxies(currency) {
let constantTerm = Galaxy.baseCost;

View File

@ -86,7 +86,7 @@ function buyMaxTimeDimensions() {
for (let i = 8; i > 0; i--) buyMaxTimeDimTier(i);
} else {
// Low EP behavior: Try to buy the highest affordable new dimension, then loop buying the cheapest possible
for (let i = 4; i > 0 && player["timeDimension" + i].bought === 0; i--)
for (let i = 4; i > 0 && TimeDimension(i).bought === 0; i--)
buyTimeDimension(i, false);
// Should never take more than like 50 iterations; explicit infinite loops make me nervous
@ -241,4 +241,4 @@ class TimeDimensionState {
function TimeDimension(tier) {
return new TimeDimensionState(tier);
}
}