Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed ll16j23s_test_docs
Diff: SnakeEngine/SnakeEngine.h
- Revision:
 - 3:fcd6d70e9694
 - Child:
 - 4:ea3fa51c4386
 
diff -r 86b67b492cbc -r fcd6d70e9694 SnakeEngine/SnakeEngine.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SnakeEngine/SnakeEngine.h	Wed May 20 21:25:40 2020 +0000
@@ -0,0 +1,55 @@
+#ifndef PONGENGINE_H
+#define PONGENGINE_H
+
+#include "mbed.h"
+#include "N5110.h"
+#include "Gamepad.h"
+#include "FXOS8700CQ.h"
+#include "SnakeBody.h"
+#include "Food.h"
+#include <vector>
+
+class SnakeEngine
+{
+
+public:
+    SnakeEngine();
+    ~SnakeEngine();
+
+    void read_input(Gamepad &pad);
+    
+    //void init(VARIABLES);
+    //void update(Gamepad &pad);
+    //void draw(N5110 &lcd);
+    
+private:
+
+    Food _x;
+    Food _y;
+
+    /*
+    void check_wall_collision(Gamepad &pad);
+    void check_paddle_collisions(Gamepad &pad);
+    void check_goal(Gamepad &pad);
+    void print_scores(N5110 &lcd);
+    
+    Paddle _p1;
+    Paddle _p2;
+     
+    int _paddle_width;
+    int _paddle_height;
+    int _ball_size;
+    int _speed;
+    
+    // x positions of the paddles
+    int _p1x;
+    int _p2x;
+    
+    Ball _ball;
+    
+    Direction _d;
+    float _mag;
+    */
+};
+
+#endif
\ No newline at end of file