<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
I am using Alice 2.4.3. One of my students today produced unexpected behavior using “move toward.” Consider this code:
<div class=""><br class="">
</div>
<div class="">
<table cellpadding="2" cellspacing="0" width="100%" style="font-family: -webkit-standard;" class="">
<tbody class="">
<tr class="">
<td colspan="2" bgcolor="#f2e6ff" style="border-left-width: 1px; border-left-style: solid; border-left-color: rgb(192, 192, 192); border-top-width: 1px; border-top-style: solid; border-top-color: rgb(192, 192, 192); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(192, 192, 192);" class="">
<b class="">Do together</b></td>
</tr>
<tr class="">
<td width="20" rowspan="2" bgcolor="#f2e6ff" style="border-left-width: 1px; border-left-style: solid; border-left-color: rgb(192, 192, 192); border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(192, 192, 192);" class="">
</td>
<td width="100%" colspan="1" bgcolor="#fff7e6" style="border: 1px solid rgb(192, 192, 192);" class="">
<span style="background-color: rgb(240, 240, 255);" class=""><b class="">chicken</b></span> <b class="">turn </b><span style="background-color: rgb(240, 240, 255);" class=""><b class="">left</b></span> <span style="background-color: rgb(240, 240, 255);" class=""><b class="">1 </b>revolution</span></td>
</tr>
<tr class="">
<td width="100%" colspan="1" bgcolor="#fff7e6" style="border: 1px solid rgb(192, 192, 192);" class="">
<span style="background-color: rgb(240, 240, 255);" class=""><b class="">chicken</b></span> <b class="">move </b><span style="background-color: rgb(240, 240, 255);" class="">amount = <b class="">2 </b>meters</span> <b class="">toward </b><span style="background-color: rgb(240, 240, 255);" class="">target
= <b class="">bunny</b></span></td>
</tr>
</tbody>
</table>
<div class=""><br class="">
</div>
</div>
<div class="">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.</div>
<div class=""><br class="">
</div>
<div class="">Is this a bug or desired behavior? If desired, can someone explain it to me?</div>
<div class=""><br class="">
</div>
<div class="">James<br class="">
<div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
—<br class="">
James Vanderhyde<br class="">
Assistant Professor, Computer Science<br class="">
Program Director, Master of Applied Computer Science<br class="">
Saint Xavier University<br class="">
3700 W. 103rd St.<br class="">
Chicago, IL 60655<br class="">
773-298-3454</div>
</div>
<br class="">
</div>
</body>
</html>