Quote from: kaywhyn on December 14, 2022, 01:01:24 PM
is the Max-Value implied to be that huge number from my post above or infinity? Or was the value for it declared somewhere in the code and I just didn't see it? Similarly, am I correct to say that -- and ++ mean -1 and +1, respectively?
Yup, you've got the gist. Integer.MAX_VALUE is exactly as Simon mentioned earlier... a named literal that equals the highest value that can be represented by a 32-bit Integer. i.e. 2^32-1. That name is built-in to Java. SuperLemminiToo (and SuperLemmini, and presumably Lemmini before it) it coded to interpret a MAX_VALUE as meaning Infinity, and to display the UI as such.
Note, that MAX_VALUE does not inherently mean Infinity. We're just using it that way. We could just as easily check NumClimbers != (2^32-1) or NumClimbers != 2147483647. Using integer.MAX_VALUE is just more convenient, and makes for easier to read code. There are data types that do allow you to represent actual infinity. Like Double.NEGATIVE_INFINITY, or Double.POSITIVE_INFINITY, or even Double.NaN (Not a Number, like divide by 0). But thsoe are only for Float types, and don't make sense for discrete values like the number of skills left.
And yup, -- is -1, and ++ is +1. Not sure if Java allows this, but in C, x++ is different from ++x. x++ uses the x variable then increments it, whereas ++x increments it first then uses it.
Anyway, that's far enough of a tangent. i pushed a new release to fix the bug. v1.51. It's on the stickied topic for SuperLemminiToo.