- 1

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

var norXot = new Grass(x,y,this.index); xotArr.push(norXot); matrix[y][x] = 1; this.multiply = 0; } } } die(){ } } class Xotaker{ constructor(x,y,ind){ this.index = ind; this.x = x; this.y = y; this.energy = 5; this.multiply = 0; } newDirections1(){ this.directions1 = [ [this.x - 1, this.y - 1], [this.x , this.y - 1], [this.x + 1, this.y - 1], [this.x - 1, this.y ], [this.x + 1, this.y ], [this.x - 1, this.y + 1], [this.x , this.y + 1], [this.x + 1, this.y + 1] ]; }

22nd Sep 2017, 5:07 PM
Azat
Azat - avatar
1 Antwort
+ 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