Posts by Douglas Fernando • 11 points
2 posts
-
0
votes1
answer50
viewsA: Help with javascript array [Snakegame.js]
I did,I executed the foreach method itself parameter that checks the index. class Cobra { constructor(){ this.corpo = { cores: ['black','orange'], tamanho: 10, posicao: [ {_x: 50, _y:200}, {_x: 40,…
-
1
votes1
answer50
viewsQ: Help with javascript array [Snakegame.js]
I have a question about Arrays in javascript using P5.js library, I want to make a coral snake, but for this I need to assign the value of the color for each element of the array, for example:…