the rest of the formulas are compact, why did I spread these ones out so much

This commit is contained in:
Lilian Jónsdóttir 2021-08-14 14:26:37 -07:00
parent 97147db78f
commit 9d61422cdc

View file

@ -94,27 +94,19 @@ end
formulas.worstCaseScenario = function(actor, mobile, ref)
local downPull = 0
local results = calculateAll(actor, mobile, ref)
local largest = common.keyOfLargestValue(results)
downPull = results[largest]
local debugStr = string.format("Pulling %s down by %s using worst mode:%s", ref.id, downPull, common.camelCaseToWords(largest))
return downPull, debugStr
end
formulas.bestCaseScenario = function(actor, mobile, ref)
local downPull = 0
local results = calculateAll(actor, mobile, ref)
local smallest = common.keyOfSmallestValue(results)
downPull = results[smallest]
local debugStr = string.format("Pulling %s down by %s using best mode:%s", ref.id, downPull, common.camelCaseToWords(smallest))
return downPull, debugStr
end