Skip to content

Instantly share code, notes, and snippets.

Created June 11, 2014 03:59
Show Gist options
  • Save anonymous/c4adc12800173a33ef5b to your computer and use it in GitHub Desktop.
Save anonymous/c4adc12800173a33ef5b to your computer and use it in GitHub Desktop.
#ifndef BALL_H
#define BALL_H
#include "coordinate.h"
#include <QPainter>
class Ball
{
public:
Ball(Coordinate coordinate);
Ball(Coordinate coordinate,
unsigned int radius);
Ball(Coordinate coordinate,
unsigned int radius,
double gravity,
double yVelocity,
double xVelocity);
~Ball(){}
void render(QPainter &painter, unsigned int time);
bool isCollision();
unsigned int getRadius();
Coordinate* getCoordinate();
private:
Ball();
Coordinate m_coordinate;
unsigned int m_radius;
double m_gravity;
double m_xVelocity;
double m_yVelocity;
};
#endif // BALL_H
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment