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

Check after each effect if the unit is still alive before performing actions #250

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Check after each effect if the unit is still alive before performing actions #250

wants to merge 1 commit into from

Conversation

glneto
Copy link
Contributor

@glneto glneto commented Jan 21, 2019

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 to diedAfterEffects.

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.

@codecov
Copy link

codecov bot commented Jan 21, 2019

Codecov Report

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

Impacted file tree graph

@@            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%> (ø) ⬆️

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.

2 similar comments
@codecov
Copy link

codecov bot commented Jan 21, 2019

Codecov Report

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

Impacted file tree graph

@@            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%> (ø) ⬆️

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.

@codecov
Copy link

codecov bot commented Jan 21, 2019

Codecov Report

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

Impacted file tree graph

@@            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%> (ø) ⬆️

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.

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.

1 participant