The integer returned by Enum#ordinal should not just use the i# format, but should be something associated with the type of the enum, like for Direction, it could be directionOrdinal.
All in the name of reducing the number of primitive local variables that have numbers after them.
The integer returned by
Enum#ordinalshould not just use thei#format, but should be something associated with the type of the enum, like forDirection, it could bedirectionOrdinal.All in the name of reducing the number of primitive local variables that have numbers after them.