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 Gamepad2 ELEC2645_Project_el18rg
Dependents: ELEC2645_Project_el18rg
Collision/Collision.h
- Committer:
- el18rg
- Date:
- 2020-05-27
- Revision:
- 3:2f4a7787beb3
- Parent:
- 2:b936aa854de2
File content as of revision 3:2f4a7787beb3:
#ifndef COLLISION_H
#define COLLISION_H
#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
#include "Ball.h"
#include "Engine.h"
#include "Cups.h"
class Collision {
public:
/** Constructor */
Collision();
/** Destructor */
~Collision();
void check_wall_collision(Gamepad &pad);
void check_paddle_collisions(Gamepad &pad);
private:
void check_goal(Gamepad &pad);
void print_scores(N5110 &lcd);
int height;
int width;
int x;
int _speed;
Direction _d;
float _mag;
Ball _ball;
Cups _cup;
int _px;
Cups _p1;
};
#endif