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:
- 15:47ea86f1ed70
- Parent:
- 13:4026781772cb
- Child:
- 16:a790f3f622f8
--- a/snake_engine/snake_engine.h Sun May 06 12:58:00 2018 +0000
+++ b/snake_engine/snake_engine.h Mon May 07 11:57:22 2018 +0000
@@ -4,31 +4,30 @@
#include "snake.h"
#include "Fruit.h"
-#ifndef SNAKENGINE_H
-#define SNAKENGINE_H
+#ifndef SNAKE_ENGINE_H
+#define SNAKE_ENGINE_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;
-
+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 printpoint(N5110 &lcd);
+ Fruit f;
+ snake s;
+ Direction _d;
+ float _mag;
};
-
#endif