demo

Dependencies:   mbed Gamepad N5110

rocket/rocket.h

Committer:
Ting12138
Date:
2020-05-14
Revision:
1:7b5a843acc05
Parent:
0:ba32cfe0051e

File content as of revision 1:7b5a843acc05:

#ifndef ROCKET_H
#define ROCKET_H

#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
class rocket
{
public:

    rocket();
    ~rocket();
    
    void init(int x);
    /** 
     * @returns x posititon of rocket
     * @brief Resets the position of rocket
     */
    void draw(N5110 &lcd);
    // accessors and mutators
    /** 
     * @returns The new coordinate of rocket
     * @brief Updates the position of rocket
     */
    void lose_score();
    // accessors and mutators
    /** 
     * @returns The score of lossing
     * @brief Updates the score of rocket
     */
    int get_final_score();
    /** 
     * @returns The new coordinate of foods
     * @brief Updates the position of foods
     */
    Vector2D get_pos();
    void replace(Direction d,float mag,Vector2D mapped_coord);
    void add_score();


private:
    int _size;
    int _x;
    int _y;
    int _scale;
    int _score;
    int _easter;

};
#endif