Closed pixelzoom closed 7 years ago
There are a couple of ways I could have addressed this. I could have changed the phase values to strings, then used string literals everywhere (as with hopperModeProperty
and histogramModeProperty
). But since these were already integer values, using the enumeration pattern seemed to be in the spirit of the current implementation, and was the least disruptive. So the phase values have been factored out into enumeration BallPhase
.
Closing.
In Ball, values are defined for the "phase" of a ball's journey from hopper to bin:
I noticed that
this.phase
is marked as@public
, but none of the values are part of the public API. Looking around I find that these constants duplicated in multiple places:Note that
LabModel.PHASE_LANDED
even has a different name thanPHASE_COLLECTED
.This is not acceptable.