This commit is contained in:
RafayAhmad7548 2024-06-16 18:53:25 +05:00
parent 37776af5db
commit ab03d5f10c
4045 changed files with 286212 additions and 3 deletions

View file

@ -0,0 +1,4 @@
#include "util.h"
class Ball{
};

View file

@ -0,0 +1,9 @@
#include "util.h"
class Ball{
};

View file

@ -0,0 +1,13 @@
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
};

View file

@ -0,0 +1,56 @@
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color) : x(x), y(y), radius(radius), color(color), vX(5), vY(5){}
void draw(){
DrawCircle(x, y, radius, color);
}
void move(){
x += vX;
y += vY;
}
void checkBoundCollision(){
if(x - radius < 0 || x + radius > 1020) vX *= -1;
if(y + radius > 840) vY *= -1;
if(y - radius < 0) exit(0);
}
int getRadius(){
return radius;
}
int getX(){
return x;
}
int getY(){
return y;
}
int getVX(){
return vX;
}
int getVY(){
return vY;
}
Ball& setVX(int vX){
this->vX = vX;
return *this;
}
Ball& setVY(int vY){
this->vY = vY;
return *this;
}
};

View file

@ -0,0 +1,61 @@
#ifndef BALL_H
#define BALL_H
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color);
void draw(){
DrawCircle(x, y, radius, color);
}
void move(){
x += vX;
y += vY;
}
void checkBoundCollision(){
if(x - radius < 0 || x + radius > 1020) vX *= -1;
if(y + radius > 840) vY *= -1;
if(y - radius < 0) exit(0);
}
int getRadius(){
return radius;
}
int getX(){
return x;
}
int getY(){
return y;
}
int getVX(){
return vX;
}
int getVY(){
return vY;
}
Ball& setVX(int vX){
this->vX = vX;
return *this;
}
Ball& setVY(int vY){
this->vY = vY;
return *this;
}
};
#endif

View file

@ -0,0 +1,38 @@
#ifndef BALL_H
#define BALL_H
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color);
Ball(const Ball& other);
void draw();
void move();
void checkBoundCollision();
int getRadius();
int getX();
int getY();
int getVX();
int getVY();
float* getColor();
Ball& setColor();
Ball& setX(int x);
Ball& setY(int y);
Ball& setVX(int vX);
Ball& setVY(int vY);
~Ball();
};
#endif

View file

@ -0,0 +1,30 @@
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color) : x(x), y(y), radius(radius), color(color), vX(1), vY(1){}
void draw(){
DrawCircle(x, y, radius, color);
}
void move(){
x += vX;
y += vY;
}
void checkBoundCollision(){
if(x - radius < 0 || x + radius > 840) vX *= -1;
}
};

View file

@ -0,0 +1,34 @@
#ifndef BALL_H
#define BALL_H
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color);
Ball(const Ball& other);
void draw();
void move();
void checkBoundCollision();
int getRadius();
int getX();
int getY();
int getVX();
int getVY();
Ball& setVX(int vX);
Ball& setVY(int vY);
~Ball();
};
#endif

View file

@ -0,0 +1,29 @@
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color) : x(x), y(y), radius(radius), color(color), vX(1), vY(1){}
void draw(){
DrawCircle(x, y, radius, color);
}
void move(){
x += vX;
y += vY;
}
void checkBoundCollision(){
}
};

View file

@ -0,0 +1,31 @@
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color) : x(x), y(y), radius(radius), color(color), vX(5), vY(5){}
void draw(){
DrawCircle(x, y, radius, color);
}
void move(){
x += vX;
y += vY;
}
void checkBoundCollision(){
if(x - radius < 0 || x + radius > 1020) vX *= -1;
if(y + radius > 840) vY *= -1;
}
};

View file

@ -0,0 +1,38 @@
#ifndef BALL_H
#define BALL_H
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color);
Ball(const Ball& other);
void draw();
void move();
bool checkBoundCollision(int& lives, int currentLevel);
int getRadius();
int getX();
int getY();
int getVX();
int getVY();
float* getColor();
Ball& setColor(float *color);
Ball& setX(int x);
Ball& setY(int y);
Ball& setVX(int vX);
Ball& setVY(int vY);
~Ball();
};
#endif

View file

@ -0,0 +1,16 @@
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
public:
Ball(int x, int y, int radius, float *color) : x(x), y(y), radius(radius), color(color){}
};

View file

@ -0,0 +1,34 @@
#ifndef BALL_H
#define BALL_H
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color);
Ball(const Ball& other);
void draw();
void move();
void checkBoundCollision();
int getRadius();
int getX();
int getY();
int getVX();
int getVY();
Ball& setVX(int vX);
Ball& setVY(int vY);
// ~Ball();
};
#endif

View file

@ -0,0 +1,21 @@
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color) : x(x), y(y), radius(radius), color(color), vX(0), vY(0){}
void draw(){
DrawCircle(x, y, radius, color);
}
};

View file

@ -0,0 +1,29 @@
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color) : x(x), y(y), radius(radius), color(color), vX(1), vY(1){}
void draw(){
DrawCircle(x, y, radius, color);
}
void move(){
x += vX;
y += vY;
}
void checkBoundCollision(){
}
};

View file

@ -0,0 +1,32 @@
#ifndef BALL_H
#define BALL_H
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color);
void draw();
void move();
void checkBoundCollision();
int getRadius();
int getX();
int getY();
int getVX();
int getVY();
Ball& setVX(int vX);
Ball& setVY(int vY);
};
#endif

View file

@ -0,0 +1,38 @@
#ifndef BALL_H
#define BALL_H
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color);
Ball(const Ball& other);
void draw();
void move();
void checkBoundCollision(int& lives);
int getRadius();
int getX();
int getY();
int getVX();
int getVY();
float* getColor();
Ball& setColor(float *color);
Ball& setX(int x);
Ball& setY(int y);
Ball& setVX(int vX);
Ball& setVY(int vY);
~Ball();
};
#endif

View file

@ -0,0 +1,38 @@
#ifndef BALL_H
#define BALL_H
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color);
Ball(const Ball& other);
void draw();
void move();
void checkBoundCollision(int& lives, int currentLevel);
int getRadius();
int getX();
int getY();
int getVX();
int getVY();
float* getColor();
Ball& setColor(float *color);
Ball& setX(int x);
Ball& setY(int y);
Ball& setVX(int vX);
Ball& setVY(int vY);
~Ball();
};
#endif

View file

@ -0,0 +1,34 @@
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color) : x(x), y(y), radius(radius), color(color), vX(5), vY(5){}
void draw(){
DrawCircle(x, y, radius, color);
}
void move(){
x += vX;
y += vY;
}
void checkBoundCollision(){
if(x - radius < 0 || x + radius > 1020) vX *= -1;
if(y + radius > 840) vY *= -1;
if(y - radius < 0) exit(0);
}
};

View file

@ -0,0 +1,38 @@
#ifndef BALL_H
#define BALL_H
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color);
Ball(const Ball& other);
void draw();
void move();
bool checkBoundCollision(int currentLevel);
int getRadius();
int getX();
int getY();
int getVX();
int getVY();
float* getColor();
Ball& setColor(float *color);
Ball& setX(int x);
Ball& setY(int y);
Ball& setVX(int vX);
Ball& setVY(int vY);
~Ball();
};
#endif

View file

@ -0,0 +1,50 @@
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color) : x(x), y(y), radius(radius), color(color), vX(5), vY(5){}
void draw(){
DrawCircle(x, y, radius, color);
}
void move(){
x += vX;
y += vY;
}
void checkBoundCollision(){
if(x - radius < 0 || x + radius > 1020) vX *= -1;
if(y + radius > 840) vY *= -1;
if(y - radius < 0) exit(0);
}
int getRadius(){
return radius;
}
int getX(){
return x;
}
int getY(){
return y;
}
Ball& setVX(int vX){
this->vX = vX;
return *this;
}
Ball& setVY(int vY){
this->vY = vY;
return *this;
}
};

View file

@ -0,0 +1,53 @@
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color) : x(x), y(y), radius(radius), color(color), vX(5), vY(5){}
void draw(){
DrawCircle(x, y, radius, color);
}
void move(){
x += vX;
y += vY;
}
void checkBoundCollision(){
if(x - radius < 0 || x + radius > 1020) vX *= -1;
if(y + radius > 840) vY *= -1;
if(y - radius < 0) exit(0);
}
int getRadius(){
return radius;
}
int getX(){
return x;
}
int getY(){
return y;
}
int getVY(){
return vY;
}
Ball& setVX(int vX){
this->vX = vX;
return *this;
}
Ball& setVY(int vY){
this->vY = vY;
return *this;
}
};

View file

@ -0,0 +1,25 @@
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color) : x(x), y(y), radius(radius), color(color), vX(0), vY(0){}
void draw(){
DrawCircle(x, y, radius, color);
}
void move(){
}
};

View file

@ -0,0 +1,18 @@
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
public:
Ball(int x, int y, int radius, float *color) : x(x), y(y), radius(radius), color(color){}
void draw(){
DrawCircle(x, y, radius, color);
}
};

View file

@ -0,0 +1,59 @@
#ifndef BALL_H
#define BALL_H
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color);
void draw();
void move(){
x += vX;
y += vY;
}
void checkBoundCollision(){
if(x - radius < 0 || x + radius > 1020) vX *= -1;
if(y + radius > 840) vY *= -1;
if(y - radius < 0) exit(0);
}
int getRadius(){
return radius;
}
int getX(){
return x;
}
int getY(){
return y;
}
int getVX(){
return vX;
}
int getVY(){
return vY;
}
Ball& setVX(int vX){
this->vX = vX;
return *this;
}
Ball& setVY(int vY){
this->vY = vY;
return *this;
}
};
#endif

View file

@ -0,0 +1,17 @@
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
public:
Ball(int x, int y, float *color) : x(x), y(y), color(color){}
};

View file

@ -0,0 +1 @@
{"version":1,"resource":"file:///home/rafayahmad/Stuff/OOP/Project/Ball.h","entries":[{"id":"0xow.h","timestamp":1714202105925},{"id":"2AJO.h","timestamp":1714202116688},{"id":"3djo.h","timestamp":1714202147031},{"id":"eUt1.h","timestamp":1714202188897},{"id":"Kgf1.h","timestamp":1714202231120},{"id":"csEN.h","timestamp":1714202262410},{"id":"ktAK.h","timestamp":1714202465385},{"id":"O0Zj.h","timestamp":1714202487778},{"id":"bTAQ.h","timestamp":1714202515838},{"id":"rmvB.h","timestamp":1714202532818},{"id":"oDsV.h","timestamp":1714202578494},{"id":"rmQT.h","timestamp":1714202606684},{"id":"BQEW.h","timestamp":1714202618614},{"id":"Oh2w.h","timestamp":1714202646477},{"id":"6Ph3.h","timestamp":1714202737643},{"id":"hwVU.h","timestamp":1714202757310},{"id":"hX7q.h","timestamp":1714203020958},{"id":"p0vJ.h","timestamp":1714203085188},{"id":"BQXN.h","timestamp":1714272183029},{"id":"xqQS.h","timestamp":1714272225072},{"id":"TnCb.h","timestamp":1714272276032},{"id":"rXRu.h","timestamp":1714272322666},{"id":"hbhS.h","timestamp":1714272383951},{"id":"mZtn.h","timestamp":1714272432242},{"id":"XfuR.h","timestamp":1714272501430},{"id":"YHoO.h","timestamp":1714272656469},{"id":"4Fby.h","timestamp":1714272668639},{"id":"lXej.h","timestamp":1714272958376},{"id":"4TMg.h","timestamp":1714273355929},{"id":"dPFL.h","timestamp":1714273442325},{"id":"PrkR.h","timestamp":1714273500501},{"id":"tiiJ.h","timestamp":1714273859494},{"id":"kK8L.h","timestamp":1714294996651},{"id":"8D8T.h","timestamp":1714700123146},{"id":"Lov6.h","timestamp":1714700313125},{"id":"fJ0a.h","timestamp":1714700379999},{"id":"pDqN.h","timestamp":1715094121338},{"id":"lAFq.h","timestamp":1715138795010},{"id":"5TUp.h","timestamp":1715145509021},{"id":"qH7G.h","timestamp":1715145548407},{"id":"R2mB.h","timestamp":1715179816597},{"id":"SHju.h","timestamp":1715179907176},{"id":"GhEc.h","timestamp":1715180569656},{"id":"Vddn.h","timestamp":1715180739686}]}

View file

@ -0,0 +1,34 @@
#ifndef BALL_H
#define BALL_H
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color);
Ball(const Ball& other);
void draw();
void move();
void checkBoundCollision();
int getRadius();
int getX();
int getY();
int getVX();
int getVY();
Ball& setVX(int vX);
Ball& setVY(int vY);
~Ball();
};
#endif

View file

@ -0,0 +1,31 @@
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color) : x(x), y(y), radius(radius), color(color), vX(5), vY(5){}
void draw(){
DrawCircle(x, y, radius, color);
}
void move(){
x += vX;
y += vY;
}
void checkBoundCollision(){
if(x - radius < 0 || x + radius > 840) vX *= -1;
if(y - radius < 0 || y + radius > 1020) vY *= -1;
}
};

View file

@ -0,0 +1,47 @@
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color) : x(x), y(y), radius(radius), color(color), vX(5), vY(5){}
void draw(){
DrawCircle(x, y, radius, color);
}
void move(){
x += vX;
y += vY;
}
void checkBoundCollision(){
if(x - radius < 0 || x + radius > 1020) vX *= -1;
if(y + radius > 840) vY *= -1;
if(y - radius < 0) exit(0);
}
int getX(){
return x;
}
int getY(){
return y;
}
Ball& setVX(int vX){
this->vX = vX;
return *this;
}
Ball& setVY(int vY){
this->vY = vY;
return *this;
}
};

View file

@ -0,0 +1,31 @@
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color) : x(x), y(y), radius(radius), color(color), vX(1), vY(1){}
void draw(){
DrawCircle(x, y, radius, color);
}
void move(){
x += vX;
y += vY;
}
void checkBoundCollision(){
if(x - radius < 0 || x + radius > 840) vX *= -1;
if(y - radius < 0 || y + radius > 1020) vY *= -1;
}
};

View file

@ -0,0 +1,32 @@
#ifndef BALL_H
#define BALL_H
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color);
Ball(const Ball& other);
void draw();
void move();
void checkBoundCollision();
int getRadius();
int getX();
int getY();
int getVX();
int getVY();
Ball& setVX(int vX);
Ball& setVY(int vY);
};
#endif

View file

@ -0,0 +1,21 @@
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color) : x(x), y(y), radius(radius), color(color){}
void draw(){
DrawCircle(x, y, radius, color);
}
};

View file

@ -0,0 +1,37 @@
#ifndef BALL_H
#define BALL_H
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color);
Ball(const Ball& other);
void draw();
void move();
void checkBoundCollision();
int getRadius();
int getX();
int getY();
int getVX();
int getVY();
float* getColor();
Ball& setX(int x);
Ball& setY(int y);
Ball& setVX(int vX);
Ball& setVY(int vY);
~Ball();
};
#endif

View file

@ -0,0 +1,61 @@
#ifndef BALL_H
#define BALL_H
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color) : x(x), y(y), radius(radius), color(color), vX(5), vY(5){}
void draw(){
DrawCircle(x, y, radius, color);
}
void move(){
x += vX;
y += vY;
}
void checkBoundCollision(){
if(x - radius < 0 || x + radius > 1020) vX *= -1;
if(y + radius > 840) vY *= -1;
if(y - radius < 0) exit(0);
}
int getRadius(){
return radius;
}
int getX(){
return x;
}
int getY(){
return y;
}
int getVX(){
return vX;
}
int getVY(){
return vY;
}
Ball& setVX(int vX){
this->vX = vX;
return *this;
}
Ball& setVY(int vY){
this->vY = vY;
return *this;
}
};
#endif

View file

@ -0,0 +1,47 @@
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color) : x(x), y(y), radius(radius), color(color), vX(5), vY(5){}
void draw(){
DrawCircle(x, y, radius, color);
}
void move(){
x += vX;
y += vY;
}
void checkBoundCollision(){
if(x - radius < 0 || x + radius > 1020) vX *= -1;
if(y + radius > 840) vY *= -1;
if(y - radius < 0) exit(0);
}
int getRadius(){
return radius;
}
int getY(){
return y;
}
Ball& setVX(int vX){
this->vX = vX;
return *this;
}
Ball& setVY(int vY){
this->vY = vY;
return *this;
}
};

View file

@ -0,0 +1,26 @@
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color) : x(x), y(y), radius(radius), color(color), vX(1), vY(1){}
void draw(){
DrawCircle(x, y, radius, color);
}
void move(){
x += vX;
y += vY;
}
};

View file

@ -0,0 +1,31 @@
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color) : x(x), y(y), radius(radius), color(color), vX(5), vY(5){}
void draw(){
DrawCircle(x, y, radius, color);
}
void move(){
x += vX;
y += vY;
}
void checkBoundCollision(){
if(x - radius < 0 || x + radius > 1020) vX *= -1;
if(y - radius < 0 || y + radius > 840) vY *= -1;
}
};

View file

@ -0,0 +1,35 @@
#ifndef BALL_H
#define BALL_H
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color);
Ball(const Ball& other);
void draw();
void move();
void checkBoundCollision();
int getRadius();
int getX();
int getY();
int getVX();
int getVY();
float* getColor();
Ball& setVX(int vX);
Ball& setVY(int vY);
~Ball();
};
#endif

View file

@ -0,0 +1,38 @@
#ifndef BALL_H
#define BALL_H
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color);
Ball(const Ball& other);
void draw();
void move();
void checkBoundCollision();
int getRadius();
int getX();
int getY();
int getVX();
int getVY();
float* getColor();
Ball& setColor(float *color);
Ball& setX(int x);
Ball& setY(int y);
Ball& setVX(int vX);
Ball& setVY(int vY);
~Ball();
};
#endif

View file

@ -0,0 +1,40 @@
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color) : x(x), y(y), radius(radius), color(color), vX(5), vY(5){}
void draw(){
DrawCircle(x, y, radius, color);
}
void move(){
x += vX;
y += vY;
}
void checkBoundCollision(){
if(x - radius < 0 || x + radius > 1020) vX *= -1;
if(y + radius > 840) vY *= -1;
if(y - radius < 0) exit(0);
}
int getX(){
return x;
}
int getY(){
return y;
}
};

View file

@ -0,0 +1,30 @@
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color) : x(x), y(y), radius(radius), color(color), vX(1), vY(1){}
void draw(){
DrawCircle(x, y, radius, color);
}
void move(){
x += vX;
y += vY;
}
void checkBoundCollision(){
}
};

View file

@ -0,0 +1,26 @@
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color) : x(x), y(y), radius(radius), color(color), vX(0), vY(0){}
void draw(){
DrawCircle(x, y, radius, color);
}
void move(){
x += vX;
y += vY;
}
};

View file

@ -0,0 +1,31 @@
#ifndef BALL_H
#define BALL_H
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color);
void draw();
void move();
void checkBoundCollision();
int getRadius();
int getX();
int getY();
int getVX();
int getVY();
Ball& setVX(int vX);
Ball& setVY(int vY);
};
#endif

View file

@ -0,0 +1,32 @@
#include "util.h"
class Ball{
const int radius;
int x;
int y;
float *color;
int vX;
int vY;
public:
Ball(int x, int y, int radius, float *color) : x(x), y(y), radius(radius), color(color), vX(5), vY(5){}
void draw(){
DrawCircle(x, y, radius, color);
}
void move(){
x += vX;
y += vY;
}
void checkBoundCollision(){
if(x - radius < 0 || x + radius > 1020) vX *= -1;
if(y + radius > 840) vY *= -1;
if(y - radius < 0) exit(0);
}
};