Zeyu Feng 201377605

Dependencies:   mbed

On Minerva

Revision:
11:494cc44777fe
Child:
12:009895f6b6e4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Interface/Interface.h	Mon May 11 09:09:31 2020 +0000
@@ -0,0 +1,56 @@
+#ifndef INTERFACE_H
+#define INTERFACE_H
+
+#include "mbed.h"
+#include "Gamepad.h"
+#include "N5110.h"
+
+/** Interface class
+    @welcome,meun,pause interface
+    @author Zeyu Feng
+    @10 MAY 2020
+   */
+struct State{
+    int option;
+    int next_state[2];
+};
+
+class Interface {
+    
+public:
+    
+    Interface();//Constructor
+        
+    ~Interface();//Destructor
+        
+    void init();
+        
+        //set a welcome interface for my game
+    void Welcome(N5110 &lcd,Gamepad &pad);
+        
+        //set an option menu
+    int menu(N5110 &lcd,Gamepad &pad,int option_flag);
+        
+        //if health of people is zero, game over~
+    void game_over(N5110 &lcd,Gamepad &pad);
+        
+        //check pause for start botton
+    int check_pause(N5110 &lcd,Gamepad &pad,int paused_flag);
+        
+        //count down and draw in lcd
+    int count_down(N5110 &lcd,int count_flag);
+    
+        //Exit interface
+    void exit(N5110 &lcd,Gamepad &pad);
+        
+        //Victory interface
+    void victory(N5110 &lcd,Gamepad &pad);
+        
+private:
+        
+    Timer _timer;
+    
+    Direction _d;
+        
+};
+#endif
\ No newline at end of file