[MWForum](no subject)

Daniel Ajoy mwforum@lists.mathcats.com
Sun, 20 Feb 2005 13:55:52 -0500


On 20 Feb 2005 at 8:58, Jeff Knope wrote:

> I also don't understand why WINNER is not run following the clickoff.  

Oh, this is what (I think) happens:

start_game runs:  everyone [clickon]

each clickon runs the instruction of each turtle: start_run random 70

start_run runs: forever [check ...]
(this happens for each horse, so we have 3 check processes
running simultaneously!)

finally, when "check" detects touching?
check runs: everyone [clickoff]

so:

by running "everyone [clickoff]", the check procedure effectively
kills itself before reaching the winner instruction.

Moral of the story: 
check shouldn't be called from within a turtle instruction.

Daniel
OpenWorld Learning
http://mia.openworldlearning.org