- 1
PLEASE WRITEĀ MOVE() AND EAT() FOR GAME----------PLEASE HELPPPPP! (PART 4)
getDirections1(g){ this.newDirections1(); varĀ found1 = []; for(varĀ iĀ in this.directions1){ varĀ x = this.directions1[i][0]; varĀ y = this.directions1[i][1]; if(x >= 0 && x < matrix[0].length && y >=0 && y <Ā matrix.length){ if(matrix[y][x] == g){ found1.push(this.directions1[i]); } } } returnĀ found1; } move(){ // please writeĀ move() } eat(){ //please writeĀ eat() } }
3 Answers
+ 6
Ummm... dude... you realize that you can use the Code Playground to post ALL of your code for us instead of creating 6 different threads/posts just so you can post your code to us?
Code PlayGround:
https://www.sololearn.com/Codes/
^Use that to post your code into one centralized spot. Delete your threads that you created. Create a new thread (just one) and post your problem / link to your code in the Code Playground. You'll get a lot more help that way.
Also, don't forget to make an attempt at figuring out your problem first, and post us the code you tried when attempting.
PS - Even if you don't want to use Code Playground, at least just post each part as its own reply in the SAME thread. :D
+ 3
FYI: We can't write something without knowing what it's supposed to do.
+ 2
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