-
Notifications
You must be signed in to change notification settings - Fork 487
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 warrior score next to health in play log #70
Conversation
Codecov Report
@@ Coverage Diff @@
## master #70 +/- ##
==========================================
+ Coverage 86.03% 86.06% +0.02%
==========================================
Files 80 80
Lines 1017 1019 +2
Branches 154 154
==========================================
+ Hits 875 877 +2
Misses 127 127
Partials 15 15
Continue to review full report at Codecov.
|
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.
Awesome work! I see the submodule packages/warriorjs-cli/bin/warriorjs/rascal-two-beginner
added in a commit, was that an accident? Also, if you could add screenshots with the Before and After, that'd be great!
@@ -10,10 +10,15 @@ import printLine from './printLine'; | |||
*/ | |||
function printWarriorStatus(warrior) { | |||
const [screenWidth] = getScreenSize(); | |||
const warriorStatus = chalk.red( | |||
const warriorStatus = chalk.redBright( |
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.
nit: for the sake of correctness, we should rename this variable to warriorHealth
.
@@ -14,6 +14,17 @@ test('prints warrior health in red', () => { | |||
}; | |||
printWarriorStatus(warrior); | |||
expect(printLine).toHaveBeenCalledWith( | |||
`${style.red.open}♥ 20 ${style.red.close}`, | |||
`${style.redBright.open}♥ 20 ${style.redBright.close}`, |
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.
super-nit: change red to bright red in the test's description as well.
Allows users to see how their score changes turn by turn. Change health color from red to bright red.
Thanks @RascalTwo! |
Allows users to see how their score changes turn by turn.
Change health color from red to bright red.