- 1

PLEASE WRITE MOVE() AND EAT() FOR GAME----------PLEASE HELPPPPP! (PART 5)

// and this is script.js for other codes var matrix = [[0,0,2,1,0,0], [1,0,0,0,2,0], [0,1,0,2,0,0], [0,0,2,1,0,0], [1,1,0,2,0,0], [0,2,0,0,0,0] ]; var x = 5; var y = 6; var side = 120; var xotArr = []; var xotakerArr = []; function setup() { frameRate(10); createCanvas(x * side, y * side); background('#acacac'); for(var i = 0; i < matrix.length; i++){ for(var j = 0; j < matrix[i].length; j++){ if(matrix[i][j] == 1){ var xotik = new Grass(j, i, 1); xotArr.push(xotik); }

22nd Sep 2017, 5:11 PM
Azat
Azat - avatar
1 Answer
+ 1
Note to visitors: All 6 questions linked in 1st part, with advice to save temporary part 1 code (provided), copy code into that, link it in Q1 and don't need the rest. https://www.sololearn.com/Discuss/734595/?ref=app
22nd Sep 2017, 5:21 PM
Kirk Schafer
Kirk Schafer - avatar