Active Visual Scaffolding by Charles Kelemen and Eugene Turk
Example (continued)
The student using Samba must write commands to samba.in that when
interpreted by Samba will yield the animation. So a portion of a
students program might look like:
....
else
{
if (current != root)
{
parentx = getx(current->parent);
}
else
{
parentx = 1;
}
float newx = getx(current) + .5*(ABS(parentx - getx(current)));
float newy = gety(current) - .08;
output << "{" << endl;
output << "move " << jake->id << " " << newx << " " << newy << endl;
output << "move " << "TX" << jake->id << " " << newx << " ";
output << newy << " " << endl;
output << "}" << endl;
}
....
To pvwtalk7