A rover’s position and location is represented by a combination of x and y co-ordinates and a letter representing one of the four cardinal compass points. The plateau is divided up into a grid to simplify navigation. An example position might be 0, 0, N, which means the rover is in the bottom left corner and facing North.
In order to control a rover , NASA sends a simple string of letters. The possible letters are ‘L’, ‘R’ and ‘M’. ‘L’ and ‘R’ makes the rover spin 90 degrees left or right respectively, without moving from its current spot. ‘M’ means move forward one grid point, and maintain the same heading.
A rover’s position and location is represented by a combination of x and y co-ordinates and a letter representing one of the four cardinal compass points. The plateau is divided up into a grid to simplify navigation. An example position might be 0, 0, N, which means the rover is in the bottom left corner and facing North.
In order to control a rover , NASA sends a simple string of letters. The possible letters are ‘L’, ‘R’ and ‘M’. ‘L’ and ‘R’ makes the rover spin 90 degrees left or right respectively, without moving from its current spot. ‘M’ means move forward one grid point, and maintain the same heading.
A rover’s position and location is represented by a combination of x and y co-ordinates and a letter representing one of the four cardinal compass points. The plateau is divided up into a grid to simplify navigation. An example position might be 0, 0, N, which means the rover is in the bottom left corner and facing North.
In order to control a rover , NASA sends a simple string of letters. The possible letters are ‘L’, ‘R’ and ‘M’. ‘L’ and ‘R’ makes the rover spin 90 degrees left or right respectively, without moving from its current spot. ‘M’ means move forward one grid point, and maintain the same heading.
I have written a simplified version of the Mars Rover challenge in Ruby. I would like to try and rewrite it in JavaScript. Before that, would youPlease review it for best coding practices.
Code
I have written a simplified version of the Mars Rover challenge in Ruby. I would like to try and rewrite it in JavaScript. Before that, would you review it for best coding practices.
Code
I have written a simplified version of the Mars Rover challenge in Ruby. Please review it for best coding practices.
- 22.4k
- 6
- 34
- 70
I have written a simplified version of the Mars Rover challenge in Ruby. I would like to try and rewrite it in JavaScript. Before that, would you review it for best coding practices perhaps and provide any advice about how to recode it JavaScript.
Working Code
Code
I have written a simplified version of the Mars Rover challenge in Ruby. I would like to try and rewrite it in JavaScript. Before that, would you review it for best coding practices perhaps and provide any advice about how to recode it JavaScript.
Working Code
I have written a simplified version of the Mars Rover challenge in Ruby. I would like to try and rewrite it in JavaScript. Before that, would you review it for best coding practices.