New turtle with Sliders

Adding sliders to the New turtle code

Log in to post a comment.

// You can find the Turtle API reference here:

// Global code will be evaluated once.
const offsetX=-92; //min=-200 max=200 step=1
const offsetY=-53; //min=-200 max=200 step=1
const size=100; //min=5 max=200 step=1
const angle=0; //min=0 max=360 step=1

const turtle = new Turtle();
turtle.goto(offsetX, offsetY); // change the starting position
turtle.right(angle) // change the starting angle

// The walk function will be called until it returns false.
function walk(i) {
    turtle.forward(size); // change the size
    return i < 4;