Skip to content

Conversation

@zydan1
Copy link

@zydan1 zydan1 commented Jan 11, 2018

hello teacher could you please accept my pull request

@remarcmij
Copy link
Owner

Hi Hamza,

You made your changes in a new branch. When you do a pull request you must select the branch that you want me to pull (in this case, in your repo it is the branch Hamza-robot-homework). On my side it would be the master branch.

To look at your code I cloned your repo directly from your GitHub account because your master branch (the one for which you created a pull request) is the same as mine.

I had to make a slight modification to get your code working. For some reason you got the parentheses at the start and end of your program mixed up.

It should be like this:

(function () {
  'use strict';

  // all your code

}());

There is also an empty row missing (the board in the example is 5x5).

Apart from that. Well done.

As a final touch it would be nice if you could reformat the code such that the move and turn function calls at then end of the program are properly indented.

There is a semi-colon missing in line 117.

The console.log in line 11 shouldn't be there. If you make a pull request make sure to you take out al console.logs that you used for debugging.

For reformat, check Use VSCode for well-formatted JavaScript

Perhaps you can make these small changes and create a new pull request with the correct branch. Then I will accept.

@remarcmij
Copy link
Owner

remarcmij commented Jan 11, 2018

Wait, still a small problem: when you move the robot completely to the right you pass over an empty square, but I still get a Yum. Same when the flag is reached.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants