olistic / warriorjs

🏰 An exciting game of programming and Artificial Intelligence
https://warriorjs.com
MIT License
9.43k stars 490 forks source link

Make warrior upset when losing points #107

Closed skywalker212 closed 6 years ago

skywalker212 commented 6 years ago

Closes #104

codecov-io commented 6 years ago

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #107      +/-   ##
==========================================
+ Coverage   90.84%   90.87%   +0.02%     
==========================================
  Files          80       80              
  Lines        1016     1019       +3     
  Branches      158      158              
==========================================
+ Hits          923      926       +3     
  Misses         77       77              
  Partials       16       16
Impacted Files Coverage Δ
packages/warriorjs-core/src/Warrior.js 100% <100%> (ø) :arrow_up:

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 42ad255...d872b7d. Read the comment docs.

skywalker212 commented 6 years ago

@olistic ya sure, but I don't know how to add a unit test, can you tell me how to add one?

olistic commented 6 years ago

@skywalker212 Sure. In this particular case, it's super easy. Just look at the earning points test in Warrior.test.js and base yours on that one!

skywalker212 commented 6 years ago

@olistic I have added the unit test, please review.

skywalker212 commented 6 years ago

@olistic I have made the changes, please review.

skywalker212 commented 6 years ago

@olistic Thanks for guiding through problems!