mirror of
https://github.com/IvarK/AntimatterDimensionsSourceCode.git
synced 2024-11-10 06:02:13 +00:00
Apply suggestions from code review
Co-Authored-By: garnet420 <795869+garnet420@users.noreply.github.com>
This commit is contained in:
parent
ea989e721d
commit
f1b3a7d2dd
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user