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

Dependencies:   mbed

Spaceship/Spaceship.h

Committer:
fy14lkaa
Date:
2019-05-05
Revision:
105:b206078335a3
Parent:
spaceship/spaceship.h@ 104:fe20457ef1a9
Child:
131:2084e4a8338f

File content as of revision 105:b206078335a3:

#ifndef SPACESHIP_H
#define SPACESHIP_H

#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
#include "Alien.h"
#include "Bullet.h"


/*int spaceship_2[10][12]= {
    {0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,1,1,0,0,0,0,0,0,0},
    {0,0,0,1,1,0,0,0,0,0,0,0},
    {0,1,1,1,1,1,1,1,0,0,0,0},
    {0,1,1,1,1,1,1,1,1,0,0,0},
    {0,1,1,1,1,1,1,1,1,1,1,0},
    {0,1,1,1,1,1,1,1,1,0,0,0},
    {0,1,1,1,1,1,1,1,0,0,0,0},
    {0,0,0,1,1,0,0,0,0,0,0,0},
    {0,0,0,1,1,0,0,0,0,0,0,0},

};
*/

class Spaceship
{

public:

    Spaceship();
    ~Spaceship();


    void init(int x_spaceship,int y_spaceship, int speed_spaceship);
    void draw(N5110 &lcd);
    void update(Direction d,float mag);
    void set_pos(int x, int y);
    int  get_pos_y();
    int  get_pos_x();
    //void read_input(Gamepad &pad);
    //void add_score();
    //int get_score();


private:

   
    int _x_spaceship;
    int _y_spaceship;
    int _speed_spaceship;

    //int _score;
    Direction d;
    float mag;
};
#endif