-
Notifications
You must be signed in to change notification settings - Fork 530
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
finished task #218
base: master
Are you sure you want to change the base?
finished task #218
Conversation
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.
src/targetNumber.js
Outdated
const targetNumber = Math.round(Math.random() * 9000 + 999).toString(); | ||
|
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.
src/targetNumber.js
Outdated
|
||
const targetNumber = Math.round(Math.random() * 9000 + 999).toString(); | ||
|
||
module.exports = { targetNumber }; |
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.
Better export a function to generate a number, not the number itself, as per requirements:
Please create separate modules for generating a number...
src/terminal.js
Outdated
return new Promise((resolve) => { | ||
terminal.question('Please enter your guess numeber: ', (number) => { | ||
return resolve(number); | ||
}); | ||
}); |
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.
This is 🔥
src/app.js
Outdated
const [bulls, cows] = checkBullsAndCows(targetNumber, userNumber); | ||
|
||
terminal.write( | ||
`\nNumber of bulls - ${bulls}, number of cows - ${cows} ${targetNumber}\n` |
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.
Not fun this way. ;)
`\nNumber of bulls - ${bulls}, number of cows - ${cows} ${targetNumber}\n` | |
`\nNumber of bulls - ${bulls}, number of cows - ${cows}\n` |
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, approve ✅
No description provided.