Home
Project Folders
Teacher Resources
Student Resources
How Do I?
Literacy
MWForum
Site Map
Search
Our Team

MWForum Message [Date Index] [Threads] [Authors] [Attachments] [Subscribe]

[Thread Prev] [Thread Next]

Subject: squares & numbers
From: mwforum@xxxxxxxxxxxxxxxxxx (Jeff Knope)
Date: Sun, 9 May 2004 11:11:19 -0700

Daniel answered Ian:

> from: "Ian" <iancouzens@xxxxxxx>
> date: Mon, 3 May 2004 4:45:50 -0600
> 
> I have 10 squares and 10 numbers all turtles.  I have 
> programmed the boxes to change (a new turtle) when touching 
> i.e., when t1 touches s1, t1 & s1 will hide & s1a appears.  
> How can I also program them to say that if s1 touches any 
> of the other 9 squares I want it to go back to it's set pos?
> 

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. 

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.
Daniel answered Ian:
 
> from: "Ian" <iancouzens@xxxxxxx>
> date: Mon, 3 May 2004 4:45:50 -0600
>
> I have 10 squares and 10 numbers all turtles.  I have
> programmed the boxes to change (a new turtle) when touching
> i.e., when t1 touches s1, t1 & s1 will hide & s1a appears. 
> How can I also program them to say that if s1 touches any
> of the other 9 squares I want it to go back to it's set pos?
>

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.
 
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.

  • Previous by thread: boxes and numbers
  • Next by thread: squares & numbers

  • To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.


    © copyright 2001 - 2008