olistic / warriorjs

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

Add RGB color to units #165

Closed olistic closed 6 years ago

olistic commented 6 years ago

Before:

before

^ Note how the Archer and the Captive had the same color due to the algorithm that was used to select colors for them automatically.

After:

after

(In the CLI, unit colors are downsampled from RGB to 256 color ANSI for greater uniformity.)

codecov-io commented 6 years ago

Codecov Report

Merging #165 into master will decrease coverage by <.01%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #165      +/-   ##
==========================================
- Coverage   92.23%   92.22%   -0.01%     
==========================================
  Files          86       86              
  Lines        1069     1068       -1     
  Branches      173      173              
==========================================
- Hits          986      985       -1     
  Misses         68       68              
  Partials       15       15
Impacted Files Coverage Ξ”
packages/warriorjs-units/src/Captive.js 100% <ΓΈ> (ΓΈ) :arrow_up:
packages/warriorjs-units/src/Archer.js 100% <ΓΈ> (ΓΈ) :arrow_up:
packages/warriorjs-units/src/Wizard.js 100% <ΓΈ> (ΓΈ) :arrow_up:
packages/warriorjs-units/src/ThickSludge.js 100% <ΓΈ> (ΓΈ) :arrow_up:
packages/warriorjs-units/src/Warrior.js 100% <ΓΈ> (ΓΈ) :arrow_up:
packages/warriorjs-units/src/Sludge.js 100% <ΓΈ> (ΓΈ) :arrow_up:
packages/warriorjs-core/src/loadLevel.js 89.28% <100%> (ΓΈ) :arrow_up:
packages/warriorjs-core/src/Warrior.js 100% <100%> (ΓΈ) :arrow_up:
packages/warriorjs-cli/src/ui/getUnitStyle.js 100% <100%> (ΓΈ) :arrow_up:
packages/warriorjs-core/src/Unit.js 100% <100%> (ΓΈ) :arrow_up:
... and 2 more

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 cbccb2d...2c3f54e. Read the comment docs.