-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add task solution #2403
base: master
Are you sure you want to change the base?
add task solution #2403
Conversation
src/makeRobot.js
Outdated
name: name, | ||
wheels: wheels, | ||
version: version, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checklist point 1
src/makeRobot.js
Outdated
@@ -38,7 +38,65 @@ | |||
* @return {Robot} | |||
*/ | |||
function makeRobot(name, wheels, version) { | |||
// write code here | |||
let isEvacuated = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after robot is evacutaed once, the flag will be set true forever, which mean that we won't be able to see info after moving robot around when he was evacuated - please omit that flag
src/makeRobot.js
Outdated
if (isEvacuated) { | ||
return `Robot has been evacuated to the service center.`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment above ⏫
src/makeRobot.js
Outdated
this.coords = { | ||
x: 1400, y: 500, | ||
}; | ||
isEvacuated = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please omit that
src/makeRobot.js
Outdated
}; | ||
isEvacuated = true; | ||
|
||
return this; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
evaluate method doesn't need to return this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job ✅
No description provided.