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: SnakeEngine/SnakeEngine.h
- Revision:
- 6:266fb8fc17f4
- Parent:
- 5:e0f08e8022de
- Child:
- 7:24a3f13ce36d
diff -r e0f08e8022de -r 266fb8fc17f4 SnakeEngine/SnakeEngine.h
--- a/SnakeEngine/SnakeEngine.h Thu May 28 16:29:55 2020 +0000
+++ b/SnakeEngine/SnakeEngine.h Thu May 28 22:56:46 2020 +0000
@@ -6,6 +6,7 @@
#include "Gamepad.h"
#include "Head.h"
#include "Body.h"
+#include "Food.h"
// gap from edge of screen
#define GAP 2
@@ -19,7 +20,7 @@
void init(int head_length,int head_speed);
void read_input(Gamepad &pad);
- void update(Gamepad &pad);
+ void update(Gamepad &pad, N5110 &lcd);
void draw(N5110 &lcd);
private:
int hx;
@@ -30,6 +31,7 @@
Head _h;
Body _b;
+ Food _f;
Direction _d;
float _mag;