Mochu Yao explorer game

Dependencies:   mbed

Committer:
el17my
Date:
Mon Apr 27 08:41:29 2020 +0000
Revision:
8:201ef0618b7d
Parent:
3:672d4bd8225d
Child:
10:559487aac60e
creating the menu

Who changed what in which revision?

UserRevisionLine numberNew contents of line
el17my 1:ed745421d8c4 1 #ifndef ITEM_H
el17my 1:ed745421d8c4 2 #define ITEM_H
el17my 1:ed745421d8c4 3
el17my 1:ed745421d8c4 4 #include "mbed.h"
el17my 1:ed745421d8c4 5
el17my 3:672d4bd8225d 6 //* @the item file has three functions
el17my 3:672d4bd8225d 7 // 1 generate an item in random position after one disappear
el17my 3:672d4bd8225d 8 // 2 build the item's structer
el17my 3:672d4bd8225d 9 // 3 build a barrier to increase difficulty
el17my 3:672d4bd8225d 10 //* @date April 13th 2020
el17my 3:672d4bd8225d 11 //* @author Yaomochu
el17my 1:ed745421d8c4 12
el17my 1:ed745421d8c4 13 class item
el17my 1:ed745421d8c4 14 {
el17my 1:ed745421d8c4 15 public:
el17my 1:ed745421d8c4 16 // Constructor and Destructor.
el17my 1:ed745421d8c4 17 item();
el17my 1:ed745421d8c4 18 ~item();
el17my 1:ed745421d8c4 19
el17my 2:89f04cd3bf45 20 // Initialises object.*/
el17my 1:ed745421d8c4 21 void init();
el17my 1:ed745421d8c4 22 //Sets the item coordinates.
el17my 1:ed745421d8c4 23 //rand_x = a random number that determines the x coordinate
el17my 1:ed745421d8c4 24 //rand_y = a random number that determines if the item's generated level
el17my 3:672d4bd8225d 25 void set_item(int random_x, int random_y);
el17my 8:201ef0618b7d 26 int *get_item_form();//
el17my 1:ed745421d8c4 27 int get_item_x();
el17my 1:ed745421d8c4 28 int get_item_y();
el17my 1:ed745421d8c4 29
el17my 1:ed745421d8c4 30
el17my 1:ed745421d8c4 31 private:
el17my 3:672d4bd8225d 32 int _x;//the x coordinate of the item
el17my 3:672d4bd8225d 33 int _y;//the y coordinate of the item
el17my 1:ed745421d8c4 34 };
el17my 1:ed745421d8c4 35 #endif