Closed alex-eg closed 7 years ago
@@ Coverage Diff @@
## master #51 +/- ##
==========================================
+ Coverage 59.7% 59.89% +0.18%
==========================================
Files 38 40 +2
Lines 1859 1945 +86
==========================================
+ Hits 1110 1165 +55
- Misses 749 780 +31
Impacted Files | Coverage Δ | |
---|---|---|
xoinvader/ingame.py | 0% <ø> (ø) |
:white_check_mark: |
xoinvader/ship.py | 0% <ø> (ø) |
:white_check_mark: |
xoinvader/tests/test_enemy_wave.py | 100% <100%> (ø) |
|
xoinvader/tests/test_animation.py | 100% <100%> (ø) |
:white_check_mark: |
xoinvader/animation.py | 98.07% <66.66%> (-1.93%) |
:x: |
xoinvader/enemy_wave.py | 96.77% <96.77%> (ø) |
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 4159a71...d983204. Read the comment docs.
Which comments should I fix? I don't get it.
Closes issue(s): [50]
Description of the changes:
add test enemy wave to ingame state
remove raise from AnimationManager animation stop
We raised StopIteration exception from objects of Animation class, when animation finished inside the AnimationManager instance. It was ok, but quite inconvenient to handle. Anyway, animation change mechanism is not implemented yet.
So for now just replace that rise with plain return, and don't support AnimationManager objects with more than one animation.
in scope of #50
fix AnimationManager update without animation
It's entirely possible that object doesn't have any animation currently, and if we call AnimationManager's update method when there's no animation, it will raise.
It's not good, so we check for current animation and just return if can't find it.
in scope of #50
add stub add_animation method to GenericXEnemy class
Since _animgr is private filed, and there are not any other ways to add animation beside AnimationManager method, we need to add a function to AnimationManager's owner class.
We call this function add_animation and it just passes *args and **kwargs to the add method of _animgr.
in scope of #50
remove default animation from GenericXEnemy class
It has no use in real world. And either way, animation should not be set outside of state.
in scope of #50
add enemy_wave module and tests
EnemyWave is a [potentianlly base] class to create waves of incoming enemies. Under the hood, it doesn't have any functionality that is particularly bound to enemy ships, it's just a restartable storage of callbacks that are called when their timeout is expired.
issue #50
Reviewers: [@pkulev]
Task list: