lee2sman da25d23a55 | ||
---|---|---|
lib | ||
README.md | ||
favicon.ico | ||
index.html | ||
turtle.js |
README.md
PLOGO
Purchase LOGO
A toy language.
A kind of LOGO-like DSL built in the p5.js library.
This is a rudimentary proof of concept right now with globals and without implementing classes or ability to loop.
How to Use
Put your code inside the turtle function in turtle.js
Reference Commands
//movement
forward(n); //moves n pixels ahead
back(n); //moves n pixels back
left(Δ); //turns Δ degrees to the left
right(Δ); //turns Δ degrees to the right
//drawing
penup(); //will draw a line with movement commands
pendown(); //will move to x,y coordinates without drawing line
//By default, pendown is on / true
//randomness
randint(n); //returns a random int between 0 and n (exclusive)
//if no input, default is between 0 and 100
//example: forward(randint(30));