ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el18s2a_2

Dependencies:   mbed

Committer:
Psy1990
Date:
Fri Jun 05 06:29:17 2020 +0000
Revision:
8:32825d724856
Child:
10:3e37b58e8600
Moved everything into classes, still trying to get everything to work. So far the snake object and apple can spawn but not in the right place :(

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Psy1990 8:32825d724856 1 #ifndef APPLE_H
Psy1990 8:32825d724856 2 #define APPLE_H
Psy1990 8:32825d724856 3
Psy1990 8:32825d724856 4 #include "mbed.h"
Psy1990 8:32825d724856 5 #include "N5110.h"
Psy1990 8:32825d724856 6 #include "Gamepad.h"
Psy1990 8:32825d724856 7
Psy1990 8:32825d724856 8
Psy1990 8:32825d724856 9
Psy1990 8:32825d724856 10 class Apple
Psy1990 8:32825d724856 11
Psy1990 8:32825d724856 12 {
Psy1990 8:32825d724856 13 public:
Psy1990 8:32825d724856 14
Psy1990 8:32825d724856 15 Apple();
Psy1990 8:32825d724856 16 ~Apple();
Psy1990 8:32825d724856 17 void init(int size);
Psy1990 8:32825d724856 18 void draw(N5110 &lcd);
Psy1990 8:32825d724856 19 Vector2D get_pos();
Psy1990 8:32825d724856 20 void set_pos(Vector2D a);
Psy1990 8:32825d724856 21
Psy1990 8:32825d724856 22 private:
Psy1990 8:32825d724856 23
Psy1990 8:32825d724856 24 int _x;
Psy1990 8:32825d724856 25 int _y;
Psy1990 8:32825d724856 26 int _size;
Psy1990 8:32825d724856 27
Psy1990 8:32825d724856 28 };
Psy1990 8:32825d724856 29 #endif