Annetta:

Which line is the error coming from?

Regards,
Robert Zupko

On Thu, Feb 14, 2019 at 11:46 AM Annetta Burger <[log in to unmask]> wrote:
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