[kde-edu]: OO syntax code in SVN

Mauricio Piacentini piacentini at kde.org
Tue Jan 27 23:10:03 CET 2009


Niels Slot wrote:
> Within a hour of coding, I've implemented a part of what Mauricio suggested.
> When the attached patch is applied to KTurtle trunk, it should allow the
> following script to run:
> 
>  forward 200
> 
> createturtle "niels"
> 
> talkto "niels"
> 
> forward 50
> 
> You should see two nice turtles on the canvas, with one named after me :).
> 
> Currently the attached patch only allows some basic commands to affect the
> second turtle. Commands like 'turnleft', 'turnright', 'go', 'center',
> 'forward' and 'backward' should work, I haven't tested them all though.
> Extending this to the other commands should be really easy. I also need to
> implement some checks. It would now for example be possible to create two
> turtles with the same name.
> 
> As earlier, feedback is welcome.

Woohoo!! Very cool, Niels! I would see if I can help with designing a 
way to store the turtle state in the canvas. And what would be the name 
of the default turtle? Or we just use talkto "turtle" ? Maybe talkto 
"cies" could be included as an easter egg? :)

Regards,
Mauricio Piacentini


More information about the kde-edu mailing list