[MWForum]squares & numbers
Jeff Knope
mwforum@lists.mathcats.com
Sun, 9 May 2004 11:11:19 -0700
This is a multi-part message in MIME format.
------=_NextPart_000_001C_01C435B6.5AEA48C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Daniel answered Ian:
> from: "Ian" <iancouzens@msn.com>
> date: Mon, 3 May 2004 4:45:50 -0600
>=20
> I have 10 squares and 10 numbers all turtles. I have=20
> programmed the boxes to change (a new turtle) when touching=20
> i.e., when t1 touches s1, t1 & s1 will hide & s1a appears. =20
> How can I also program them to say that if s1 touches any=20
> of the other 9 squares I want it to go back to it's set pos?
>=20
Hi Ian,
Maybe the attached project will put you in the right track.
Do you want me to explain the code?
Daniel
OpenWorld Learning
I greatly admire Daniel's ability to abstract the questions, and offer =
just gentle nudges in the right direction.
In this case, I'm having difficulty seeing how to efficiently handle the =
necessary additional turtles for the other numbers.=20
It seems undesirable (and probably unnecessary) to launch more "forever" =
statements. Every time I launch one of those, my computer fan shifts =
into high gear. If there were nine or ten of them going, I'm afraid it'd =
set off the kitchen smoke alarm.
It looks like the logical place would be more "touching? statements. =
Even this may be unnecessary since the moved turtle is already the =
current turtle. What would be the syntax for replacing "t10 with a more =
general reference to the current turtle?
Similarly, in act_with_pair, the test might compare the current turtle =
to (current turtle - 9), which be the correct square for the current =
turtle.
Anyway, my question is: How would you go about expanding the project to =
cover "t11..."t18?
Thanks,
- Jeff
P.S.: Happy Mother's Day to all it applies.
------=_NextPart_000_001C_01C435B6.5AEA48C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Daniel answered Ian:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV>> from: "Ian" <<A=20
href=3D"mailto:iancouzens@msn.com">iancouzens@msn.com</A>><BR>> =
date: Mon, 3=20
May 2004 4:45:50 -0600<BR>> <BR>> I have 10 squares and 10 numbers =
all=20
turtles. I have <BR>> programmed the boxes to change (a new =
turtle)=20
when touching <BR>> i.e., when t1 touches s1, t1 & s1 will hide =
& s1a=20
appears. <BR>> How can I also program them to say that if s1 =
touches=20
any <BR>> of the other 9 squares I want it to go back to it's set=20
pos?<BR>> <BR><BR>Hi Ian,<BR><BR>Maybe the attached project will put =
you in=20
the right track.<BR>Do you want me to explain the=20
code?<BR><BR>Daniel<BR>OpenWorld Learning<BR><BR><FONT face=3DArial =
size=3D2>I=20
greatly admire Daniel's ability to abstract the questions, and offer =
just gentle=20
nudges in the right direction.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>In this case, I'm having difficulty =
seeing how to=20
efficiently handle the necessary additional turtles for the other =
numbers.=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>It seems undesirable (and probably =
unnecessary) to=20
launch more "forever" statements. Every time I launch one of those, my =
computer=20
fan shifts into high gear. If there were nine or ten of them going, I'm =
afraid=20
it'd set off the kitchen smoke alarm.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>It looks like the logical place would =
be more=20
"touching? statements. Even this may be unnecessary since the moved =
turtle is=20
already the current turtle. What would be the syntax for replacing "t10 =
with a=20
more general reference to the current turtle?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Similarly, in act_with_pair, the test =
might compare=20
the current turtle to (current turtle - 9), which be the correct square =
for the=20
current turtle.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Anyway, my question is: How would you =
go about=20
expanding the project to cover "t11..."t18?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>- Jeff</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>P.S.: Happy Mother's Day to all it=20
applies.</FONT></DIV></BODY></HTML>
------=_NextPart_000_001C_01C435B6.5AEA48C0--