[MWForum]InFront does not seem to work correctly.
Daniel Ajoy
mwforum@lists.mathcats.com
Sat, 30 Nov 2002 11:46:29 -0500
On 29 Nov 2002 at 13:02, Walter Smith wrote:
> I ran into the same problem that Ron did with stacking turtles when making a
> concentration game for my kindergarten class ... I abandoned the turtle over
> turtle method ... and switch the shape of the turtle to what was needed ...
> see attached ...
This procedure can be compressed:
> to toshape ;sets the shape when clicked on
> if who = "t1 [setsh :t1shape]
> if who = "t2 [setsh :t2shape]
> if who = "t3 [setsh :t3shape]
> if who = "t4 [setsh :t4shape]
> if who = "t5 [setsh :t5shape]
> if who = "t6 [setsh :t6shape]
> if who = "t7 [setsh :t7shape]
> if who = "t8 [setsh :t8shape]
> end
to this:
to toshape ;sets the shape when clicked on
setsh thing word who "shape
end
And this:
to go ;runs the show
setup.vari
select.shape make "t1shape :shape make "t2shape :shape
t1, place
t2, place
select.shape make "t3shape :shape make "t4shape :shape
t3, place
t4, place
select.shape make "t5shape :shape make "t6shape :shape
t5, place
t6, place
select.shape make "t7shape :shape make "t8shape :shape
t7, place
t8, place
end
Can be compressed to this:
to go
setup.vari
dolist [i [1 3 5 7]] [
select.shape
make (word "t :i + 0 "shape) :shape
make (word "t :i + 1 "shape) :shape
]
end
Or even to this:
to go
setup.vari
dolist [i [1 3 5 7]] [
select.shape
dotimes [j 2] [make (word "t :i + :j "shape) :shape]
]
end
http://www-2.cs.cmu.edu/~pattis/quotations.html
> In the development of the understanding of complex
> phenomena, the most powerful tool available to the
> human intellect is abstraction. Abstraction arises
> from the recognition of similarities between
> certain objects, situations, or processes in the
> real world and the decision to concentrate on
> these similarities and to ignore, for the time
> being, their differences.
>
> - C.A.R. Hoare
However:
> Fancy optimizers have fancy bugs.
> - R. Pike
:)
Daniel
OpenWorld Learning