test
This commit is contained in:
parent
37776af5db
commit
ab03d5f10c
4045 changed files with 286212 additions and 3 deletions
4
.config/Code/User/History/df7a268/0xow.h
Normal file
4
.config/Code/User/History/df7a268/0xow.h
Normal file
|
@ -0,0 +1,4 @@
|
|||
#include "util.h"
|
||||
class Ball{
|
||||
|
||||
};
|
9
.config/Code/User/History/df7a268/2AJO.h
Normal file
9
.config/Code/User/History/df7a268/2AJO.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
#include "util.h"
|
||||
class Ball{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
13
.config/Code/User/History/df7a268/3djo.h
Normal file
13
.config/Code/User/History/df7a268/3djo.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#include "util.h"
|
||||
class Ball{
|
||||
const int radius;
|
||||
|
||||
int x;
|
||||
int y;
|
||||
float *color;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
56
.config/Code/User/History/df7a268/4Fby.h
Normal file
56
.config/Code/User/History/df7a268/4Fby.h
Normal 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;
|
||||
}
|
||||
|
||||
|
||||
};
|
61
.config/Code/User/History/df7a268/4TMg.h
Normal file
61
.config/Code/User/History/df7a268/4TMg.h
Normal 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
|
38
.config/Code/User/History/df7a268/5TUp.h
Normal file
38
.config/Code/User/History/df7a268/5TUp.h
Normal 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
|
30
.config/Code/User/History/df7a268/6Ph3.h
Normal file
30
.config/Code/User/History/df7a268/6Ph3.h
Normal 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;
|
||||
}
|
||||
|
||||
|
||||
};
|
34
.config/Code/User/History/df7a268/8D8T.h
Normal file
34
.config/Code/User/History/df7a268/8D8T.h
Normal 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
|
29
.config/Code/User/History/df7a268/BQEW.h
Normal file
29
.config/Code/User/History/df7a268/BQEW.h
Normal 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(){
|
||||
}
|
||||
|
||||
|
||||
};
|
31
.config/Code/User/History/df7a268/BQXN.h
Normal file
31
.config/Code/User/History/df7a268/BQXN.h
Normal 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;
|
||||
}
|
||||
|
||||
|
||||
};
|
38
.config/Code/User/History/df7a268/GhEc.h
Normal file
38
.config/Code/User/History/df7a268/GhEc.h
Normal 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
|
16
.config/Code/User/History/df7a268/Kgf1.h
Normal file
16
.config/Code/User/History/df7a268/Kgf1.h
Normal 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){}
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
34
.config/Code/User/History/df7a268/Lov6.h
Normal file
34
.config/Code/User/History/df7a268/Lov6.h
Normal 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
|
21
.config/Code/User/History/df7a268/O0Zj.h
Normal file
21
.config/Code/User/History/df7a268/O0Zj.h
Normal 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);
|
||||
}
|
||||
|
||||
|
||||
};
|
29
.config/Code/User/History/df7a268/Oh2w.h
Normal file
29
.config/Code/User/History/df7a268/Oh2w.h
Normal 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(){
|
||||
}
|
||||
|
||||
|
||||
};
|
32
.config/Code/User/History/df7a268/PrkR.h
Normal file
32
.config/Code/User/History/df7a268/PrkR.h
Normal 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
|
38
.config/Code/User/History/df7a268/R2mB.h
Normal file
38
.config/Code/User/History/df7a268/R2mB.h
Normal 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
|
38
.config/Code/User/History/df7a268/SHju.h
Normal file
38
.config/Code/User/History/df7a268/SHju.h
Normal 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
|
34
.config/Code/User/History/df7a268/TnCb.h
Normal file
34
.config/Code/User/History/df7a268/TnCb.h
Normal 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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
38
.config/Code/User/History/df7a268/Vddn.h
Normal file
38
.config/Code/User/History/df7a268/Vddn.h
Normal 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
|
50
.config/Code/User/History/df7a268/XfuR.h
Normal file
50
.config/Code/User/History/df7a268/XfuR.h
Normal 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;
|
||||
}
|
||||
|
||||
|
||||
};
|
53
.config/Code/User/History/df7a268/YHoO.h
Normal file
53
.config/Code/User/History/df7a268/YHoO.h
Normal 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;
|
||||
}
|
||||
|
||||
|
||||
};
|
25
.config/Code/User/History/df7a268/bTAQ.h
Normal file
25
.config/Code/User/History/df7a268/bTAQ.h
Normal 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(){
|
||||
|
||||
}
|
||||
|
||||
|
||||
};
|
18
.config/Code/User/History/df7a268/csEN.h
Normal file
18
.config/Code/User/History/df7a268/csEN.h
Normal 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);
|
||||
}
|
||||
|
||||
|
||||
};
|
59
.config/Code/User/History/df7a268/dPFL.h
Normal file
59
.config/Code/User/History/df7a268/dPFL.h
Normal 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
|
17
.config/Code/User/History/df7a268/eUt1.h
Normal file
17
.config/Code/User/History/df7a268/eUt1.h
Normal 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){}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
1
.config/Code/User/History/df7a268/entries.json
Normal file
1
.config/Code/User/History/df7a268/entries.json
Normal 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}]}
|
34
.config/Code/User/History/df7a268/fJ0a.h
Normal file
34
.config/Code/User/History/df7a268/fJ0a.h
Normal 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
|
31
.config/Code/User/History/df7a268/hX7q.h
Normal file
31
.config/Code/User/History/df7a268/hX7q.h
Normal 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;
|
||||
}
|
||||
|
||||
|
||||
};
|
47
.config/Code/User/History/df7a268/hbhS.h
Normal file
47
.config/Code/User/History/df7a268/hbhS.h
Normal 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;
|
||||
}
|
||||
|
||||
|
||||
};
|
31
.config/Code/User/History/df7a268/hwVU.h
Normal file
31
.config/Code/User/History/df7a268/hwVU.h
Normal 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;
|
||||
}
|
||||
|
||||
|
||||
};
|
32
.config/Code/User/History/df7a268/kK8L.h
Normal file
32
.config/Code/User/History/df7a268/kK8L.h
Normal 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
|
21
.config/Code/User/History/df7a268/ktAK.h
Normal file
21
.config/Code/User/History/df7a268/ktAK.h
Normal 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);
|
||||
}
|
||||
|
||||
|
||||
};
|
37
.config/Code/User/History/df7a268/lAFq.h
Normal file
37
.config/Code/User/History/df7a268/lAFq.h
Normal 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
|
61
.config/Code/User/History/df7a268/lXej.h
Normal file
61
.config/Code/User/History/df7a268/lXej.h
Normal 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
|
47
.config/Code/User/History/df7a268/mZtn.h
Normal file
47
.config/Code/User/History/df7a268/mZtn.h
Normal 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;
|
||||
}
|
||||
|
||||
|
||||
};
|
26
.config/Code/User/History/df7a268/oDsV.h
Normal file
26
.config/Code/User/History/df7a268/oDsV.h
Normal 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;
|
||||
}
|
||||
|
||||
|
||||
};
|
31
.config/Code/User/History/df7a268/p0vJ.h
Normal file
31
.config/Code/User/History/df7a268/p0vJ.h
Normal 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;
|
||||
}
|
||||
|
||||
|
||||
};
|
35
.config/Code/User/History/df7a268/pDqN.h
Normal file
35
.config/Code/User/History/df7a268/pDqN.h
Normal 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
|
38
.config/Code/User/History/df7a268/qH7G.h
Normal file
38
.config/Code/User/History/df7a268/qH7G.h
Normal 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
|
40
.config/Code/User/History/df7a268/rXRu.h
Normal file
40
.config/Code/User/History/df7a268/rXRu.h
Normal 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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
30
.config/Code/User/History/df7a268/rmQT.h
Normal file
30
.config/Code/User/History/df7a268/rmQT.h
Normal 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(){
|
||||
|
||||
}
|
||||
|
||||
|
||||
};
|
26
.config/Code/User/History/df7a268/rmvB.h
Normal file
26
.config/Code/User/History/df7a268/rmvB.h
Normal 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;
|
||||
}
|
||||
|
||||
|
||||
};
|
31
.config/Code/User/History/df7a268/tiiJ.h
Normal file
31
.config/Code/User/History/df7a268/tiiJ.h
Normal 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
|
32
.config/Code/User/History/df7a268/xqQS.h
Normal file
32
.config/Code/User/History/df7a268/xqQS.h
Normal 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);
|
||||
}
|
||||
|
||||
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue