A LOGO turtle implementation using the MakeCode screen support
Перейти к файлу
microsoft-github-policy-service[bot] 76dbec622b
Microsoft mandatory file (#2)
Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com>
2023-06-05 10:35:34 -07:00
.github/workflows Bug fix and some helper functions (#1) 2020-07-30 12:15:12 -07:00
.vscode initial release 2018-06-01 08:42:12 -07:00
assets 0.1.2 2020-08-02 05:27:52 -07:00
.gitattributes Bug fix and some helper functions (#1) 2020-07-30 12:15:12 -07:00
.gitignore initial release 2018-06-01 08:42:12 -07:00
.travis.yml initial release 2018-06-01 08:42:12 -07:00
LICENSE Create LICENSE 2020-08-02 05:33:32 -07:00
Makefile initial release 2018-06-01 08:42:12 -07:00
README.md updated readme 2020-08-02 05:36:11 -07:00
SECURITY.md Microsoft mandatory file (#2) 2023-06-05 10:35:34 -07:00
_config.yml Update _config.yml 2020-08-02 05:38:07 -07:00
index.html Bug fix and some helper functions (#1) 2020-07-30 12:15:12 -07:00
pxt.json 0.1.2 2020-08-02 05:27:52 -07:00
test.ts updated example 2020-08-02 05:27:40 -07:00
tsconfig.json initial release 2018-06-01 08:42:12 -07:00
turtle.ts fixing precision issue 2020-08-02 05:26:35 -07:00

README.md

title
LOGO Manual

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

  • for PXT/arcade (The metadata above is needed for package search.)

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)

  • for PXT/arcade