ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el19tb

Dependencies:   mbed

Committer:
el19tb
Date:
Wed May 06 16:53:18 2020 +0000
Revision:
4:aae7f8d4ab78
Parent:
3:648c9d5001be
Child:
5:6e3afee7eac3
Made the code more structured, added different vehicle types;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
el19tb 4:aae7f8d4ab78 1
el19tb 2:86cef2afa648 2 #ifndef CROSSYCHICKEN_H
el19tb 2:86cef2afa648 3 #define CROSSYCHICKEN_H
el19tb 3:648c9d5001be 4
el19tb 2:86cef2afa648 5 #include "mbed.h"
el19tb 2:86cef2afa648 6 #include "N5110.h"
el19tb 2:86cef2afa648 7 #include "Gamepad.h"
el19tb 3:648c9d5001be 8 #include "Chicken.h"
el19tb 3:648c9d5001be 9 #include "Car.h"
el19tb 4:aae7f8d4ab78 10 #include <vector>
el19tb 2:86cef2afa648 11
el19tb 2:86cef2afa648 12 struct Input{
el19tb 2:86cef2afa648 13 //UP,
el19tb 2:86cef2afa648 14 //DOWN,
el19tb 2:86cef2afa648 15 //LEFT,
el19tb 2:86cef2afa648 16 //RIGHT
el19tb 2:86cef2afa648 17 };
el19tb 2:86cef2afa648 18
el19tb 2:86cef2afa648 19 class CrossyChicken {
el19tb 2:86cef2afa648 20 public:
el19tb 2:86cef2afa648 21 void start();
el19tb 2:86cef2afa648 22 void input();
el19tb 2:86cef2afa648 23 void process_input();
el19tb 2:86cef2afa648 24 void clear();
el19tb 2:86cef2afa648 25
el19tb 2:86cef2afa648 26 void game();
el19tb 2:86cef2afa648 27 void refresh();
el19tb 3:648c9d5001be 28
el19tb 3:648c9d5001be 29 void moveChicken(int xWay, int yWay);
el19tb 3:648c9d5001be 30
el19tb 3:648c9d5001be 31 void moveCar();
el19tb 3:648c9d5001be 32 void move();
el19tb 3:648c9d5001be 33
el19tb 3:648c9d5001be 34 void setup();
el19tb 4:aae7f8d4ab78 35
el19tb 3:648c9d5001be 36 private:
el19tb 2:86cef2afa648 37 };
el19tb 2:86cef2afa648 38
el19tb 2:86cef2afa648 39
el19tb 2:86cef2afa648 40 #endif
el19tb 2:86cef2afa648 41
el19tb 2:86cef2afa648 42
el19tb 2:86cef2afa648 43