View on GitHub

pxt-screen-turtle

A LOGO turtle implementation using the MakeCode screen support

screen-turtle

A LOGO-like turtle for https://arcade.makecode.com

Use as Extension

This repository can be added as an extension in MakeCode.

Turtle functions

The turtle has a position, a direction and a pen. All units are in pixels. You can also turn any sprite into a turtle by using from sprite.

Moves: forward and back

Move the turtle forward and backward by some pixels; in the current direction

turtle.forward(30)
turtle.back(30)

There is also a shortcut home to reset the turtle position

turtle.home()

Turns: turn

turtle.turn(90)

Painting

Lift and lower the pen

turtle.pen(TurtlePenMode.Down)
turtle.pen(TurtlePenMode.Up)
turtle.pen(TurtlePenMode.Erase)

And change the pen color

turtle.setPenColor(4)

Edit this project MakeCode Arcade Release

To edit this repository in MakeCode.

License

MIT

Supported targets

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Metadata (used for search, rendering)