olistic / warriorjs

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

Load towers dynamically #169

Closed olistic closed 6 years ago

olistic commented 6 years ago

This adds support for community towers, as well as official towers that don't ship with the game. WarriorJS CLI searches for towers (@warriorjs/tower-* and warriorjs-tower-*) in the nearest parent node_modules directory. This should work for both global and local installations of the CLI.

Closes #100 Fixes #168

codecov-io commented 6 years ago

Codecov Report

Merging #169 into master will increase coverage by 0.15%. The diff coverage is 89.58%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #169      +/-   ##
==========================================
+ Coverage   92.19%   92.35%   +0.15%     
==========================================
  Files          83       85       +2     
  Lines        1051     1072      +21     
  Branches      177      179       +2     
==========================================
+ Hits          969      990      +21     
  Misses         67       67              
  Partials       15       15
Impacted Files Coverage Ξ”
packages/warriorjs-cli/src/loadTowers.js 100% <100%> (ΓΈ)
packages/warriorjs-cli/src/Tower.js 100% <100%> (ΓΈ) :arrow_up:
packages/warriorjs-cli/src/Profile.js 96.36% <100%> (+0.06%) :arrow_up:
packages/warriorjs-cli/src/utils/getLevelConfig.js 100% <100%> (ΓΈ) :arrow_up:
packages/warriorjs-cli/src/utils/getTowerId.js 100% <100%> (ΓΈ)
packages/warriorjs-cli/src/Game.js 52.63% <68.75%> (+1.28%) :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 fc038df...9a37067. Read the comment docs.