Laila Al Badwawi 200906179 SpaceInvaders I declare this my own independent work and understand the university rules on plagiarism.
Dependencies: mbed
Diff: Alien/Alien.cpp
- Revision:
- 142:92f277a3e7e6
- Parent:
- 141:02858e82c9cc
- Child:
- 149:bd0f37008f5a
--- a/Alien/Alien.cpp Thu May 09 06:46:27 2019 +0000 +++ b/Alien/Alien.cpp Thu May 09 07:39:34 2019 +0000 @@ -71,16 +71,19 @@ //void function to set the position of the alien in x-cooridante and y_cooridante. void Alien::set_pos(int x, int y) { - _x_alien = x; - _y_alien = y; + _x_alien = x; //the position of the alien at x-coordniate is equal to x. + _y_alien = y; //the position of the alien at y-coordniate is equal to y. } +//void function to add the scores of the alien. void Alien::add_score() { _score++; // increment the scores by 1. //printf("scores increament by 1\n") } + +//void function to get the scores of the alien. int Alien::get_score() { return _score; //return the numbers of the scores which achived by the alien. @@ -95,10 +98,9 @@ //printf("alive alien is true\n") } - +//void function to set up the alive alien. -void Alien::setAlive(bool alive) //void function to set up the alive alien. -{ +void Alien::setAlive(bool alive){ _alive = alive; //printf("alive alien is set up\n") }