Robert,
Thanks for the recommended reading for clean code. I'll check it out.
I have tried your example:
MasonGeometry geometry = (MasonGeometry)object;
Indv indv = (Indv)geometry.getUserData();
int hColor = indv.getHealthStatus();
The Sim gives me the same error:
java.lang.ClassCastException: java.base/java.lang.Integer cannot be cast to disaster.Indv
Annetta
|