I am translating from Processing:
http://vestera.as/processing/?id=23
to p5.js:
https://editor.p5js.org/steinlav/sketches/1rkgu_AGI
Problem in p5.js line 57
Why is it not possible to ad object “head” to the array “body”?
I have stared at this for hours
function update() {
// Puts the head in the array. Why does this not work?
**body.push(head);**
if (grow > 0) {
// Shall grow, Head is moving. Tail stays behind.
grow--;
} else {
// Removing tail cell
body.splice(0, 1);
}