NetLogo/Tortoise

`hatch-<breed>` should initialize new `<breeds>-own` variables to 0

Closed this issue · 3 comments

Dor Abrahamson writes:

http://www.netlogoweb.org/launch#http://www.netlogoweb.org/assets/modelslib/Curricular%20Models/ProbLab/4%20Block%20Stalagmites.nlogo

Setup
Go
Organize

“Error
Checking equality on undefined is an invalid condition”

The problem stems from the fact that hatch-sample-organizers is being called by sample-dudes, while sample-organizers have the variable original-pycor, but sample-dudes do not. original-pycor is being initialized to undefined, rather than 0. The malfeasant line is here, where no effort is made to do anything sensible if the new variable didn't actually exist in the old hatcher's breed.

Fix incoming shortly.

is there missing test coverage for this back in the main NetLogo repo?

Fixed by d0f8377.