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: Alien/Alien.cpp
- Revision:
- 20:0b6f1cfc5be6
- Parent:
- 19:43de9fd725ba
- Child:
- 21:970807533b10
--- a/Alien/Alien.cpp Fri May 01 14:46:10 2020 +0000 +++ b/Alien/Alien.cpp Fri May 01 19:41:24 2020 +0000 @@ -58,10 +58,19 @@ void Alien::flag_set(int counter){ int c = counter; if(c%7 == 1){ - int r = rand()%10; - if(r < 3) { + int r = rand()%20; + if((r < 2)&& + (Alive == true)) { Shoot = true; } } } +vector<AlienBullet> Alien::get_bullet_vector(){ + vector<AlienBullet> v = alien_bullet_vector.get_vector(); + return v; +} + +void Alien::set_bullet_hit(int i, bool hit){ + alien_bullet_vector.set_hit(i,hit); +}