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
Falldown/Falldown.h
- Committer:
- el17cr
- Date:
- 2019-04-22
- Revision:
- 4:03d13a53308c
- Parent:
- 3:5edefa83f8f0
- Child:
- 5:1a9d84df7207
File content as of revision 4:03d13a53308c:
#ifndef FALLDOWN_H #define FALLDOWN_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "Ball.h" #include "Ground.h" #define GAP 2 class Falldown { public: Falldown(); ~Falldown(); void init(int ground_height,int ball_size); void read_input(Gamepad &pad); void update(Gamepad &pad); void draw(N5110 &lcd); private: void check_wall_collision(Gamepad &pad); void check_Ground_collisions(Gamepad &pad); void check_goal(N5110 &lcd); //void print_scores(N5110 &lcd); Ground _ground1; Ground _ground2; Ball _ball; int _ground_width1; int _ground_height; int _ground_width2; int _ball_size; // x positions of the Grounds int _g1x; int _g2x; int _g1y; int _g2y; int _bally; Direction _d; float _mag; }; #endif