Mochu Yao explorer game

Dependencies:   mbed

Revision:
8:201ef0618b7d
Parent:
7:88c4ba6bb37b
Child:
10:559487aac60e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Surface/surface.h	Mon Apr 27 08:41:29 2020 +0000
@@ -0,0 +1,51 @@
+/** surface 
+* @the surface file has three functions
+//1 the leftside of the line move toward right then the rightside should also move to the right to keep the length
+//2 the line will be random length but must be suitable
+//3 makesure there are two surface for player to stay
+* @date April 22th 2020
+* @author Yaomochu
+*/
+#ifndef LINE_H
+#define LINE_H
+
+#include "mbed.h"
+//the surface function is to creat the surface for player to stand on and move
+struct Line {
+ int length;
+ int left;
+ int right;
+ int y;
+ };
+ //the line structer will have four main elements 
+ class Surface
+{
+public:
+Surface();
+~Surface();
+void init(int y1, int y2);
+//init the line at first to set the initial position
+void line_1();
+void line_2();
+void line_3();
+void line_4();
+void line_5();
+void line_6();
+Line getline_1();
+Line getline_2();
+Line getline_3();
+Line getline_4();
+Line getline_5();
+Line getline_6();
+
+private:
+Line _line_1;
+Line _line_2;
+Line _line_3;
+Line _line_4;
+Line _line_5;
+Line _line_6;
+
+};
+#endif
+