Yufan Zhong / Mbed 2 deprecated GOLD_MINER

Dependencies:   mbed

MinerEngine/MinerEngine.h

Committer:
ZhongYufan
Date:
2020-04-22
Revision:
1:9c7bb3db32bc
Child:
7:5bb5cde8951a

File content as of revision 1:9c7bb3db32bc:

#ifndef MINERENGINE_H
#define MINERENGINE_H

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

// gap from edge of screen
#define GAP 2

class MinerEngine
{

public:
    MinerEngine();
    ~MinerEngine();

    void init(int winch_width,int winch_height,int claw_size,int speed);
    void read_input(Gamepad &pad);
    void update(Gamepad &pad);
    void draw(N5110 &lcd);
    void welcome(Gamepad &pad, N5110 &lcd);
    void MinerEngine::menu(Gamepad &pad, N5110 &lcd);
    void MinerEngine::select(Gamepad &pad, N5110 &lcd);
    int MinerEngine::get_select(Gamepad &pad);
    void MinerEngine::setting(Gamepad &pad, N5110 &lcd);
    int direction;
    int game;
    
private:

    void check_wall_collision(Gamepad &pad);
    void check_winch_collisions(Gamepad &pad);
    void check_goal(Gamepad &pad);
    void print_scores(N5110 &lcd);
  
    Winch _winch;
    Claw _claw;
    Gold _gold;
    Monster _monster;
    
    int _winch_width;
    int _winch_height;
    int _monster_width;
    int _monster_height;
    int _claw_size;
    int _speed;
    int _gold_num;
    float _monster_speed;
    // x positions of the winchs
    int _winch_x;
    int _monster_x;
    int _claw_x;
    int _s;
    int _state;
    
    
    Direction _d;
    float _mag;
    ////////////
    int s;
};

#endif