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
Diff: snake_engine/snake_engine.h
- Revision:
- 13:4026781772cb
- Child:
- 15:47ea86f1ed70
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/snake_engine/snake_engine.h Sun May 06 12:44:41 2018 +0000
@@ -0,0 +1,35 @@
+#include "mbed.h"
+#include "N5110.h"
+#include "Gamepad.h"
+#include "snake.h"
+#include "Fruit.h"
+
+#ifndef SNAKENGINE_H
+#define SNAKENGINE_H
+
+class snake_engine
+{
+ public:
+ snake_engine();
+ ~snake_engine();
+ void init();
+ void draw(N5110 &lcd);
+ void update(Gamepad &pad , N5110 &lcd);
+ void read_input(Gamepad &pad);
+ bool getfruit(Gamepad &pad);
+
+
+
+ private:
+ void print_point(N5110 &lcd);
+ Direction _d;
+ snake s;
+ Fruit f;
+ float _mag;
+
+};
+
+#endif
+
+
+