Mochu Yao explorer game
Dependencies: mbed
Diff: Surface/surface.h
- Revision:
- 28:4a1260ad0346
- Parent:
- 27:354d91d59b6d
- Child:
- 29:2d592452e3fb
diff -r 354d91d59b6d -r 4a1260ad0346 Surface/surface.h --- a/Surface/surface.h Tue Apr 28 17:58:00 2020 +0000 +++ b/Surface/surface.h Tue Apr 28 18:21:22 2020 +0000 @@ -2,7 +2,7 @@ #define LINE_H #include "mbed.h" - +/** Line struct */ struct Line { int length; int left; @@ -71,25 +71,79 @@ @endcode */ -//the surface function is to creat the surface for player to stand on and move + class Surface { public: +// Constructor and Destructor. + /** + * @brief Constructor @details Non user specified. + */ Surface(); +/** + * @brief Destructor @details Non user specified. + */ ~Surface(); +/** + * @brief init the line at first to set the initial position. + * @param y1 @details the lower line height. + * @param y2 @details the upper line height. + */ void init(int y1, int y2); -//init the line at first to set the initial position +/** + * @brief set line1 movement. + */ void line_1(); +/** + * @brief set line2 movement. + */ void line_2(); +/** + * @brief set line3 movement. + */ void line_3(); +/** + * @brief set line4 movement. + */ void line_4(); +/** + * @brief set line5 movement. + */ void line_5(); +/** + * @brief set line6 movement. + */ void line_6(); + // Accessors. + /** + * @brief Gets line 1. + * @returns Line 1 (type: struct, Line) + */ Line getline_1(); + /** + * @brief Gets line 2. + * @returns Line 2 (type: struct, Line) + */ Line getline_2(); + /** + * @brief Gets line 3. + * @returns Line 3 (type: struct, Line) + */ Line getline_3(); + /** + * @brief Gets line 4. + * @returns Line 4 (type: struct, Line) + */ Line getline_4(); + /** + * @brief Gets line 5. + * @returns Line 5 (type: struct, Line) + */ Line getline_5(); + /** + * @brief Gets line 6. + * @returns Line 6 (type: struct, Line) + */ Line getline_6(); private: