Laila Al Badwawi 200906179 SpaceInvaders I declare this my own independent work and understand the university rules on plagiarism.

Dependencies:   mbed

Alien/Alien.h

Committer:
fy14lkaa
Date:
2019-04-22
Revision:
52:84e89553c606
Parent:
51:cb644365d9a3
Child:
92:8a1b14488ca5

File content as of revision 52:84e89553c606:

#ifndef Alien_H
#define Alien_H



#include "mbed.h"
#include "Gamepad.h"
#include "N5110.h"
#include "SpaceInvadersEngine.h"

/** Alien class 
@brief class for spaceship 
@version 1.0
@author Laila Al Badwawi
@date April 2019
*/

class Alien
{
    public:
 // constructors
  //string Variables of this type are able to store sequences of characters, 
  //such as words or sentences. 
  /**
  *@constucter creat a defult Alien
  */
 
    
    Alien();  //constructor
    
    ~Alien();  //destructor 
    
        
/*mutators
  //mutator methods defined as methods which advice the users of the class 
  //to change the value of a member variable in a controlled manner. 
  Their names are usually pre-fixed with set_ to make this behaviour clear.*/
  
   /** 
  *@brief initialise an identity for the Alien
  *@param size @details size of Alien in intger
  *@param speed @details the speed of Alien in integer
  */
    void init(int size,int speed);
    /** 
  *@brief drawing the Alien
  *@param draw @details drawing the Alien by using N5110&lcd librarieas
  **/
    
    void draw(N5110 &lcd);
    
 /** 
  *@brief updating the position of the Alien
  *@param update @details update the position of the Alien.
  **/
        void update();
        
   /** 
  *@brief sitting up the velocity the of the Alien
  *@param _velocity @details set the velocity the of the Alien in Vector2D
  **/
      
    void set_velocity(Vector2D v);
           
   /** 
  *@brief sitting up the position the of the Alien
  *@param _pos @details set the position the of the Alien in Vector2D
  **/
      void set_pos(Vector2D p);
      /** 
  *@brief sitting up the velocity the of the Alien
  *@return the velocity of the Alien in Vector2D
  **/
        
    Vector2D get_velocity();
         /** 
  *@brief sitting up the position  the of the Alien
  *@return the postion  of the Alien in Vector2D
  **/
    
    Vector2D get_pos();
   
private:
//member variables 
//parameters 

/*@param 
 _velocity
 */
    Vector2D _velocity;     // declation of a variable member _velocity  which shows the velocity of the Alien in Vector2D.
/*@param 
_size
 */
    int _size;              // declation of a variable member _size which shows the size of the Alien.
/*@param 
_x
 */
 
    int _x;                ////declation of a variable member _x which shows the x-cooridante of the Alien.
    
/*@param
_y
 */
    int _y;              //declation of a variable member _y which shows the y-cooridante of the Alien.
};
#endif