Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: SpaceInvadersEngine/SpaceInvadersEngine.cpp
- Revision:
- 61:b248d2c31b4f
- Parent:
- 60:c5f97e0a14eb
- Child:
- 62:0bd9b22ad5ed
diff -r c5f97e0a14eb -r b248d2c31b4f SpaceInvadersEngine/SpaceInvadersEngine.cpp
--- a/SpaceInvadersEngine/SpaceInvadersEngine.cpp Sat Apr 27 16:10:33 2019 +0000
+++ b/SpaceInvadersEngine/SpaceInvadersEngine.cpp Sat Apr 27 16:17:47 2019 +0000
@@ -47,21 +47,19 @@
void SpaceInvadersEngine::update(Gamepad &pad)
{
-
+ check_goal(pad);
-void SpaceInvadersEngine::update(Gamepad&pad)
-{
- _A1.update(_d,_mag);
+ void SpaceInvadersEngine::update(Gamepad&pad) {
+ _A1.update(_d,_mag);
-}
-void SpaceInvadersEngine::check_wall_collision(Gamepad &pad)
-{
+ }
+ void SpaceInvadersEngine::check_wall_collision(Gamepad &pad) {
- // read current Alien attributes
- Vector2D Alien_pos = _Alien.get_pos();
- Vector2D Alien_velocity = _Alien.get_velocity();
+ // read current Alien attributes
+ Vector2D Alien_pos = _Alien.get_pos();
+ Vector2D Alien_velocity = _Alien.get_velocity();
-}
+ }