Mochu Yao explorer game

Dependencies:   mbed

item/item.h

Committer:
el17my
Date:
2020-04-27
Revision:
8:201ef0618b7d
Parent:
3:672d4bd8225d
Child:
10:559487aac60e

File content as of revision 8:201ef0618b7d:

#ifndef ITEM_H
#define ITEM_H

#include "mbed.h"

//* @the item file has three functions
//  1 generate an item in random position after one disappear
// 2 build the item's structer
// 3 build a barrier to increase difficulty
//* @date April 13th 2020
//* @author Yaomochu

class item
{
public:
    // Constructor and Destructor.
    item();
    ~item();

    // Initialises object.*/
    void init();
    //Sets the item coordinates.
    //rand_x = a random number that determines the x coordinate
    //rand_y = a random number that determines if the item's generated level
    void set_item(int random_x, int random_y);
    int *get_item_form();//
    int get_item_x();
    int get_item_y();


private:
    int _x;//the x coordinate of the item
    int _y;//the y coordinate of the item
};
#endif