Skip to content

Commit

Permalink
makeRobot
Browse files Browse the repository at this point in the history
  • Loading branch information
volodymyrsar committed Jul 19, 2023
1 parent 4bdc2fd commit 399192d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/makeRobot.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,21 @@ function makeRobot(name, wheels, version) {
},

get info() {
const names = this.name;
const versions = this.version;
const wheel = this.wheels;
// const names = this.name;
// const versions = this.version;
// const wheel = this.wheels;

return `name: ${names}, chip version: ${versions}, wheels: ${wheel}`;
return `name: ${name}, chip version: ${version}, wheels: ${wheels}`;
},

get location() {
return `${this.name}: x=${this.coords.x}, y=${this.coords.y}`;
return `${name}: x=${this.coords.x}, y=${this.coords.y}`;
},

goForward(steps = 1) {
if (steps > 0) {
this.coords.y += steps;
}
};

return this;
},
Expand Down

0 comments on commit 399192d

Please sign in to comment.