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
Engine/Engine.h
- Committer:
- davidwst421
- Date:
- 2019-05-08
- Revision:
- 4:fcd80b40f257
- Parent:
- 0:fd8eda608206
- Child:
- 6:a0f3dbbc8d33
File content as of revision 4:fcd80b40f257:
#ifndef ENGINE_H #define ENGINE_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "Stone.h" #include "Avenger.h" #include "Wall.h" class Engine { public: Engine(); ~Engine(); void init(int wall_width,int wall_gap,int avenger_size,int stone_size,int speed); void read_input(Gamepad &pad); void draw(N5110 &lcd); void update(Gamepad &pad); int get_score(); private: void check_wall_collision(Gamepad &pad); void check_score(Gamepad &pad); void print_score(N5110 &lcd); Wall _w0; Wall _w1; Wall _w2; Wall _w3; Wall _w4; int _wall_width; int _wall_gap; int _avenger_size; int _stone_size; int _speed; // x positions of the paddles int _w0x; int _w1x; int _w2x; int _w3x; int _w4x; int _avengerx; int _stonex; Avenger _avenger; Stone _stone; Direction _d; float _mag; }; #endif