Localization (was: RE: Computerchannel.de: Squeak 3.0 tested)
Dan Ingalls
Dan at SqueakLand.org
Thu Sep 27 16:11:43 UTC 2001
goran.hultgren at bluefish.se wrote...
>3. These I just don't understand:
>
>(color:sees: #colorSees 'whether the given color sees the given color')
>- Errr. What?!?
This is a hack that lets newbies do some collision logic simply. The first parameter is a color which defines a sensitive part of me. Think of a bug with a red nose. The second parameter is a color that we're looking for in the world. Think of a yellow flower. Now you can write a very simple script that will cause a wandering bug to stick to a yellow flower if it finds one. You can do maze following, autopilot and lots of cool things with this.
>(followPath 'followPath' 'follow the yellow brick road') - Obviously a
>"saying" (which I have heard but don't really know what it means, but I
>could skip it of course)
The Quote is from the Wizard of OZ. I wouldn't try to duplicate it - it is cute but not useful. The path used is the one defined by the 'draw new path' option in the menu of the red halo button.
Hope this helps.
- Dan
--
More information about the Squeak-dev
mailing list
|