- 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