A nascent LOGO-like library built in p5.js
Go to file
lee2sman da25d23a55 add turtle favicon 2021-01-21 04:21:17 -05:00
lib moved library-dsl file into lib subdir 2021-01-21 04:18:17 -05:00
README.md add section on how to use 2021-01-21 04:18:38 -05:00
favicon.ico add turtle favicon 2021-01-21 04:21:17 -05:00
index.html moved library-dsl file into lib subdir 2021-01-21 04:18:17 -05:00
turtle.js initial commit 2021-01-21 04:14:14 -05:00

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));