Skip to content
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

Merged
merged 1 commit into from
May 11, 2018
Merged

Add warrior score next to health in play log #70

merged 1 commit into from
May 11, 2018

Conversation

RascalTwo
Copy link
Contributor

Allows users to see how their score changes turn by turn.

Change health color from red to bright red.

@codecov-io
Copy link

codecov-io commented May 11, 2018

Codecov Report

Merging #70 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
packages/warriorjs-core/src/Warrior.js 100% <ø> (ø) ⬆️
...ackages/warriorjs-cli/src/ui/printWarriorStatus.js 100% <100%> (ø) ⬆️
packages/warriorjs-cli/src/ui/printBoard.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 027dd80...6e6995d. Read the comment docs.

Copy link
Owner

@olistic olistic left a 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(
Copy link
Owner

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}`,
Copy link
Owner

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.
@RascalTwo
Copy link
Contributor Author

Sorry about my player dictionary accidentally being included, that's what I get for leaving it there.

Good catch on the warriorStatus variable and test name, fixed both of them.


Before Changes:

before-change

Red and Bright Yellow:

bright-yellow-warrior-score

Bright Red and Bright Yellow: (Current)

both-colors

@olistic olistic merged commit 30d96d0 into olistic:master May 11, 2018
@olistic
Copy link
Owner

olistic commented May 11, 2018

Thanks @RascalTwo!

@RascalTwo RascalTwo deleted the feature-print-warrior-score branch May 11, 2018 16:57
@olistic olistic changed the title Add warrior score next to health in play log (#48) Add warrior score next to health in play log May 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants