Open glneto opened 5 years ago
Merging #250 into master will increase coverage by
0.02%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #250 +/- ##
==========================================
+ Coverage 92.39% 92.41% +0.02%
==========================================
Files 92 92
Lines 1091 1094 +3
Branches 165 165
==========================================
+ Hits 1008 1011 +3
Misses 68 68
Partials 15 15
Impacted Files | Coverage Δ | |
---|---|---|
packages/warriorjs-core/src/Unit.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 ec531b4...0bfc2a4. Read the comment docs.
Merging #250 into master will increase coverage by
0.02%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #250 +/- ##
==========================================
+ Coverage 92.39% 92.41% +0.02%
==========================================
Files 92 92
Lines 1091 1094 +3
Branches 165 165
==========================================
+ Hits 1008 1011 +3
Misses 68 68
Partials 15 15
Impacted Files | Coverage Δ | |
---|---|---|
packages/warriorjs-core/src/Unit.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 ec531b4...0bfc2a4. Read the comment docs.
Merging #250 into master will increase coverage by
0.02%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #250 +/- ##
==========================================
+ Coverage 92.39% 92.41% +0.02%
==========================================
Files 92 92
Lines 1091 1094 +3
Branches 165 165
==========================================
+ Hits 1008 1011 +3
Misses 68 68
Partials 15 15
Impacted Files | Coverage Δ | |
---|---|---|
packages/warriorjs-core/src/Unit.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 ec531b4...0bfc2a4. Read the comment docs.
I used
some
to check if after any effect the unit.isAlive() would return false. In case the unit is not alive after any effect, it will skip the next iterations and return true todiedAfterEffects
.Then, I added another check (
!diedAfterEffects
) before starting to perform the unit actions.Let me know if you think this can be improved in any way.