alice-teacher Question about move toward

Vanderhyde, James vanderhyde at sxu.edu
Thu Feb 9 16:22:40 EST 2017


I am using Alice 2.4.3. One of my students today produced unexpected behavior using “move toward.” Consider this code:

 Do together
          chicken turn left 1 revolution
  chicken move amount = 2 meters toward target = bunny

The chicken turns in a circle rather than turning while moving toward the bunny. I know that “move forward” combined with “turn left” will result in circular movement. But I don’t understand why “move toward” is doing it. After all, “move toward” by itself works no matter which way the chicken is facing.

Is this a bug or desired behavior? If desired, can someone explain it to me?

James
—
James Vanderhyde
Assistant Professor, Computer Science
Program Director, Master of Applied Computer Science
Saint Xavier University
3700 W. 103rd St.
Chicago, IL 60655
773-298-3454

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20170209/2094a1c3/attachment.html>


More information about the alice-teachers mailing list