Translating Syntax Shorthand for Beginners?

@mnoble Look at what you started! :)

This topic inspired me to make the maze in P5.js.

Processing version:

And P5.js version of this:

// https://10print.org/
// P5.js version of:
// 10 PRINT CHR$(205.5+RND(1)); : GOTO 10

n=25
setup=_=>{createCanvas(w=500,w)
x=y=0
while(y<w){r=int(random(2))*n
line(x+r,y,x+n-r,y+n)
x+=n
if(x>w){y+=n;x=0}}}

I removed the semicolons and used a line feed instead; each counts as a character.
The n=25 did not make it smaller (still the same size) but left it in there for this example.

:)

3 Likes