Yufan Zhong / Mbed 2 deprecated GOLD_MINER

Dependencies:   mbed

Claw/Claw.h

Committer:
ZhongYufan
Date:
2020-04-22
Revision:
1:9c7bb3db32bc
Child:
8:c5969685cf02

File content as of revision 1:9c7bb3db32bc:

#ifndef CLAW_H
#define CLAW_H

#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
#include "Winch.h"
#include "Monster.h"

/** Claw Class
@author Dr Craig A. Evans, University of Leeds
@brief Controls the claw in the Pong game 
@date Febraury 2017
*/ 
class Claw
{

public:
    Claw();
    ~Claw();
    void init(int winch_width);
    void draw(N5110 &lcd);
    void update(Direction d,float mag);
    /// accessors and mutators
    void add_now_score();
    int get_now_score();
    void set_velocity(int v);
    int get_velocity();
    Vector2D get_pos();
    void set_pos(Vector2D p);
    
    
    
private:
    int _winch_width;
    int _x0;
    int _y0;
    int _x1;
    int _y1;
    int _velocity_y;
    int _now_score;
    int _speed_x;
    
};
#endif