// Welcome to Turtletoy!
//
// Turtletoy is a community for creative coding. We believe the joy 
// is in the craft. 
//
// ---------------------------------------------------------------
// A NOTE ON AI:
// Please do not publish code entirely generated by AI. 
// We want to see YOUR creativity, your mistakes, and your logic. 
// If you use AI to learn, try to rewrite the code yourself before 
// sharing, so others can learn from your human approach.
// ---------------------------------------------------------------
//
// API Reference: https://turtletoy.net/syntax

Canvas.setpenopacity(1);

// Global code will be evaluated once.
const turtle = new Turtle();
turtle.penup();
turtle.goto(-50,-20);
turtle.pendown();

// The walk function will be called until it returns false.
function walk(i) {
    turtle.forward(100);
    turtle.right(144);
    return i < 4;
}