test
This commit is contained in:
parent
37776af5db
commit
ab03d5f10c
4045 changed files with 286212 additions and 3 deletions
35
.config/Code/User/History/-78f4582a/AJ3p.cpp
Normal file
35
.config/Code/User/History/-78f4582a/AJ3p.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class YellowFood : public Food{
|
||||
|
||||
const int dimension = 20;
|
||||
|
||||
public:
|
||||
|
||||
YellowFood(int x, int y) : Food(x, y, colors[YELLOW]){}
|
||||
void draw() override{
|
||||
DrawSquare(x, y, dimension, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball**& balls) override{
|
||||
if(Food::counter == 0){
|
||||
int ballX, ballY;
|
||||
float *ballColor;
|
||||
for(int i=0;i<3;i++){
|
||||
if(balls[i] != nullptr){
|
||||
ballX = balls[i]->getX();
|
||||
ballY = balls[i]->getY();
|
||||
ballColor = balls[i]->getColor();
|
||||
}
|
||||
}
|
||||
for(int i=0;i<3;i++){
|
||||
if(balls[i] == nullptr){
|
||||
balls[i] = new Ball(ballX, ballY, 10, ballColor);
|
||||
if(i == 1) balls[i]->setVX(-5);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
~YellowFood(){}
|
||||
|
||||
};
|
17
.config/Code/User/History/-78f4582a/AZPv.cpp
Normal file
17
.config/Code/User/History/-78f4582a/AZPv.cpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class YellowFood : public Food{
|
||||
|
||||
const int dimension = 20;
|
||||
|
||||
public:
|
||||
|
||||
PinkFood(int x, int y) : Food(x, y, colors[PINK]){}
|
||||
void draw() override{
|
||||
DrawSquare(x, y, dimension, color);
|
||||
}
|
||||
~PinkFood(){}
|
||||
|
||||
|
||||
};
|
22
.config/Code/User/History/-78f4582a/DSuE.cpp
Normal file
22
.config/Code/User/History/-78f4582a/DSuE.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class YellowFood : public Food{
|
||||
|
||||
const int dimension = 20;
|
||||
|
||||
public:
|
||||
|
||||
YellowFood(int x, int y) : Food(x, y, colors[YELLOW]){}
|
||||
void draw() override{
|
||||
DrawSquare(x, y, dimension, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball& ball, Ball*& ball1, Ball*& ball2) override{
|
||||
if(Food::counter == 0){
|
||||
ball1 = new Ball(ball.getX(), ball.getY(), ball.getRadius(), colors[RED]);
|
||||
ball2 = new Ball(ball.getX(), ball.getY(), ball.getRadius(), colors[RED]);
|
||||
}
|
||||
}
|
||||
~YellowFood(){}
|
||||
|
||||
};
|
19
.config/Code/User/History/-78f4582a/FW2h.cpp
Normal file
19
.config/Code/User/History/-78f4582a/FW2h.cpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class YellowFood : public Food{
|
||||
|
||||
const int dimension = 20;
|
||||
|
||||
public:
|
||||
|
||||
YellowFood(int x, int y) : Food(x, y, colors[YELLOW]){}
|
||||
void draw() override{
|
||||
DrawSquare(x, y, dimension, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball& ball) override{
|
||||
|
||||
}
|
||||
~YellowFood(){}
|
||||
|
||||
};
|
31
.config/Code/User/History/-78f4582a/GmkT.cpp
Normal file
31
.config/Code/User/History/-78f4582a/GmkT.cpp
Normal file
|
@ -0,0 +1,31 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class YellowFood : public Food{
|
||||
|
||||
const int dimension = 20;
|
||||
|
||||
public:
|
||||
|
||||
YellowFood(int x, int y) : Food(x, y, colors[YELLOW]){}
|
||||
void draw() override{
|
||||
DrawSquare(x, y, dimension, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball**& balls) override{
|
||||
if(Food::counter == 0){
|
||||
int ballX, ballY;
|
||||
for(int i=0;i<3;i++){
|
||||
if(balls[i] != nullptr){
|
||||
|
||||
}
|
||||
}
|
||||
for(int i=0;i<3;i++){
|
||||
if(balls[i] == nullptr){
|
||||
balls[i] = new Ball()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
~YellowFood(){}
|
||||
|
||||
};
|
32
.config/Code/User/History/-78f4582a/KiQb.cpp
Normal file
32
.config/Code/User/History/-78f4582a/KiQb.cpp
Normal file
|
@ -0,0 +1,32 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class YellowFood : public Food{
|
||||
|
||||
const int dimension = 20;
|
||||
|
||||
public:
|
||||
|
||||
YellowFood(int x, int y) : Food(x, y, colors[YELLOW]){}
|
||||
void draw() override{
|
||||
DrawSquare(x, y, dimension, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball**& balls) override{
|
||||
if(Food::counter == 0){
|
||||
int ballX, ballY;
|
||||
for(int i=0;i<3;i++){
|
||||
if(balls[i] != nullptr){
|
||||
ballX = balls[i]->getX();
|
||||
ballY = balls[i]->getY();
|
||||
}
|
||||
}
|
||||
for(int i=0;i<3;i++){
|
||||
if(balls[i] == nullptr){
|
||||
balls[i] = new Ball(ballX, ballY);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
~YellowFood(){}
|
||||
|
||||
};
|
34
.config/Code/User/History/-78f4582a/SWcL.cpp
Normal file
34
.config/Code/User/History/-78f4582a/SWcL.cpp
Normal file
|
@ -0,0 +1,34 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class YellowFood : public Food{
|
||||
|
||||
const int dimension = 20;
|
||||
|
||||
public:
|
||||
|
||||
YellowFood(int x, int y) : Food(x, y, colors[YELLOW]){}
|
||||
void draw() override{
|
||||
DrawSquare(x, y, dimension, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball**& balls) override{
|
||||
if(Food::counter == 0){
|
||||
int ballX, ballY;
|
||||
float *ballColor;
|
||||
for(int i=0;i<3;i++){
|
||||
if(balls[i] != nullptr){
|
||||
ballX = balls[i]->getX();
|
||||
ballY = balls[i]->getY();
|
||||
ballColor = balls[i]->getColor();
|
||||
}
|
||||
}
|
||||
for(int i=0;i<3;i++){
|
||||
if(balls[i] == nullptr){
|
||||
balls[i] = new Ball(ballX, ballY, 10, ballColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
~YellowFood(){}
|
||||
|
||||
};
|
36
.config/Code/User/History/-78f4582a/T3HD.cpp
Normal file
36
.config/Code/User/History/-78f4582a/T3HD.cpp
Normal file
|
@ -0,0 +1,36 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class YellowFood : public Food{
|
||||
|
||||
const int dimension = 20;
|
||||
|
||||
public:
|
||||
|
||||
YellowFood(int x, int y) : Food(x, y, colors[YELLOW]){}
|
||||
void draw() override{
|
||||
DrawSquare(x, y, dimension, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball**& balls) override{
|
||||
if(Food::counter == 0){
|
||||
int ballX, ballY;
|
||||
float *ballColor;
|
||||
for(int i=0;i<3;i++){
|
||||
if(balls[i] != nullptr){
|
||||
ballX = balls[i]->getX();
|
||||
ballY = balls[i]->getY();
|
||||
ballColor = balls[i]->getColor();
|
||||
}
|
||||
}
|
||||
for(int i=0;i<3;i++){
|
||||
if(balls[i] == nullptr){
|
||||
balls[i] = new Ball(ballX, ballY, 10, ballColor);
|
||||
if(i == 1) balls[i]->setVX(-5);
|
||||
}
|
||||
}
|
||||
powerActive = true;
|
||||
}
|
||||
}
|
||||
~YellowFood(){}
|
||||
|
||||
};
|
20
.config/Code/User/History/-78f4582a/UAVX.cpp
Normal file
20
.config/Code/User/History/-78f4582a/UAVX.cpp
Normal file
|
@ -0,0 +1,20 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class YellowFood : public Food{
|
||||
|
||||
const int dimension = 20;
|
||||
|
||||
public:
|
||||
|
||||
YellowFood(int x, int y) : Food(x, y, colors[YELLOW]){}
|
||||
void draw() override{
|
||||
DrawSquare(x, y, dimension, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball& ball, Ball*& ball1, Ball*& ball2) override{
|
||||
ball1 = new Ball(ball.getX(), ball.getY(), ball.getRadius(), colors[RED]);
|
||||
ball2 = new Ball(ball.getX(), ball.getY(), ball.getRadius(), colors[RED]);
|
||||
}
|
||||
~YellowFood(){}
|
||||
|
||||
};
|
19
.config/Code/User/History/-78f4582a/VqXS.cpp
Normal file
19
.config/Code/User/History/-78f4582a/VqXS.cpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class YellowFood : public Food{
|
||||
|
||||
const int dimension = 20;
|
||||
|
||||
public:
|
||||
|
||||
YellowFood(int x, int y) : Food(x, y, colors[YELLOW]){}
|
||||
void draw() override{
|
||||
DrawSquare(x, y, dimension, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball& ball) override{
|
||||
|
||||
}
|
||||
~YellowFood(){}
|
||||
|
||||
};
|
22
.config/Code/User/History/-78f4582a/Wlx0.cpp
Normal file
22
.config/Code/User/History/-78f4582a/Wlx0.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class YellowFood : public Food{
|
||||
|
||||
const int dimension = 20;
|
||||
|
||||
public:
|
||||
|
||||
YellowFood(int x, int y) : Food(x, y, colors[YELLOW]){}
|
||||
void draw() override{
|
||||
DrawSquare(x, y, dimension, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball& ball) override{
|
||||
if(Food::counter == 0){
|
||||
ball1 = new Ball(ball.getX(), ball.getY(), ball.getRadius(), colors[RED]);
|
||||
ball2 = new Ball(ball.getX(), ball.getY(), ball.getRadius(), colors[RED]);
|
||||
}
|
||||
}
|
||||
~YellowFood(){}
|
||||
|
||||
};
|
16
.config/Code/User/History/-78f4582a/Ydrd.cpp
Normal file
16
.config/Code/User/History/-78f4582a/Ydrd.cpp
Normal file
|
@ -0,0 +1,16 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class YellowFood : public Food{
|
||||
|
||||
const int dimension = 20;
|
||||
|
||||
public:
|
||||
|
||||
YellowFood(int x, int y) : Food(x, y, colors[YELLOW]){}
|
||||
void draw() override{
|
||||
DrawSquare(x, y, dimension, color);
|
||||
}
|
||||
~YellowFood(){}
|
||||
|
||||
};
|
32
.config/Code/User/History/-78f4582a/YgWr.cpp
Normal file
32
.config/Code/User/History/-78f4582a/YgWr.cpp
Normal file
|
@ -0,0 +1,32 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class YellowFood : public Food{
|
||||
|
||||
const int dimension = 20;
|
||||
|
||||
public:
|
||||
|
||||
YellowFood(int x, int y) : Food(x, y, colors[YELLOW]){}
|
||||
void draw() override{
|
||||
DrawSquare(x, y, dimension, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball**& balls) override{
|
||||
if(Food::counter == 0){
|
||||
int ballX, ballY;
|
||||
float *ballColor;
|
||||
for(int i=0;i<3;i++){
|
||||
if(balls[i] != nullptr){
|
||||
ballX = balls[i]->getX();
|
||||
ballY = balls[i]->getY();
|
||||
ballColor = balls[i]->getColor();
|
||||
}
|
||||
}
|
||||
for(int i=0;i<3;i++){
|
||||
if(balls[i] == nullptr) balls[i] = new Ball(ballX, ballY, 10, ballColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
~YellowFood(){}
|
||||
|
||||
};
|
19
.config/Code/User/History/-78f4582a/ZyQu.cpp
Normal file
19
.config/Code/User/History/-78f4582a/ZyQu.cpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class YellowFood : public Food{
|
||||
|
||||
const int dimension = 20;
|
||||
|
||||
public:
|
||||
|
||||
YellowFood(int x, int y) : Food(x, y, colors[YELLOW]){}
|
||||
void draw() override{
|
||||
DrawSquare(x, y, dimension, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball& ball, Ball*& ball1, Ball*& ball2) override{
|
||||
|
||||
}
|
||||
~YellowFood(){}
|
||||
|
||||
};
|
32
.config/Code/User/History/-78f4582a/c1eh.cpp
Normal file
32
.config/Code/User/History/-78f4582a/c1eh.cpp
Normal file
|
@ -0,0 +1,32 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class YellowFood : public Food{
|
||||
|
||||
const int dimension = 20;
|
||||
|
||||
public:
|
||||
|
||||
YellowFood(int x, int y) : Food(x, y, colors[YELLOW]){}
|
||||
void draw() override{
|
||||
DrawSquare(x, y, dimension, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball**& balls) override{
|
||||
if(Food::counter == 0){
|
||||
int ballX, ballY;
|
||||
for(int i=0;i<3;i++){
|
||||
if(balls[i] != nullptr){
|
||||
ballX = balls[i]->getX();
|
||||
ballY = balls[i]->getY();
|
||||
}
|
||||
}
|
||||
for(int i=0;i<3;i++){
|
||||
if(balls[i] == nullptr){
|
||||
balls[i] = new Ball()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
~YellowFood(){}
|
||||
|
||||
};
|
22
.config/Code/User/History/-78f4582a/dUC4.cpp
Normal file
22
.config/Code/User/History/-78f4582a/dUC4.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class YellowFood : public Food{
|
||||
|
||||
const int dimension = 20;
|
||||
|
||||
public:
|
||||
|
||||
YellowFood(int x, int y) : Food(x, y, colors[YELLOW]){}
|
||||
void draw() override{
|
||||
DrawSquare(x, y, dimension, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball**& balls) override{
|
||||
// if(Food::counter == 0){
|
||||
// ball1 = new Ball(ball.getX(), ball.getY(), ball.getRadius(), colors[RED]);
|
||||
// ball2 = new Ball(ball.getX(), ball.getY(), ball.getRadius(), colors[RED]);
|
||||
// }
|
||||
}
|
||||
~YellowFood(){}
|
||||
|
||||
};
|
35
.config/Code/User/History/-78f4582a/edb6.cpp
Normal file
35
.config/Code/User/History/-78f4582a/edb6.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class YellowFood : public Food{
|
||||
|
||||
const int dimension = 20;
|
||||
|
||||
public:
|
||||
|
||||
YellowFood(int x, int y) : Food(x, y, colors[YELLOW]){}
|
||||
void draw() override{
|
||||
DrawSquare(x, y, dimension, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball**& balls) override{
|
||||
if(Food::counter == 0){
|
||||
int ballX, ballY;
|
||||
float *ballColor;
|
||||
for(int i=0;i<3;i++){
|
||||
if(balls[i] != nullptr){
|
||||
ballX = balls[i]->getX();
|
||||
ballY = balls[i]->getY();
|
||||
ballColor = balls[i]->getColor();
|
||||
}
|
||||
}
|
||||
for(int i=0;i<3;i++){
|
||||
if(balls[i] == nullptr){
|
||||
balls[i] = new Ball(ballX, ballY, 10, ballColor);
|
||||
balls[i]->setVX(-5);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
~YellowFood(){}
|
||||
|
||||
};
|
1
.config/Code/User/History/-78f4582a/entries.json
Normal file
1
.config/Code/User/History/-78f4582a/entries.json
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":1,"resource":"file:///home/rafayahmad/Stuff/OOP/Project/YellowFood.cpp","entries":[{"id":"AZPv.cpp","timestamp":1714703304476},{"id":"Ydrd.cpp","timestamp":1714703331743},{"id":"nuG9.cpp","timestamp":1714889902438},{"id":"VqXS.cpp","timestamp":1714972947815},{"id":"fny1.cpp","timestamp":1714973040091},{"id":"FW2h.cpp","timestamp":1714973079108},{"id":"kpEH.cpp","timestamp":1714974680395},{"id":"ZyQu.cpp","timestamp":1714975157402},{"id":"UAVX.cpp","timestamp":1714975195603},{"id":"DSuE.cpp","timestamp":1714975224386},{"id":"Wlx0.cpp","timestamp":1715077825750},{"id":"dUC4.cpp","timestamp":1715077843321},{"id":"pfKk.cpp","timestamp":1715093993622},{"id":"eqvz.cpp","timestamp":1715094015299},{"id":"GmkT.cpp","timestamp":1715094050822},{"id":"c1eh.cpp","timestamp":1715094065135},{"id":"KiQb.cpp","timestamp":1715094075808},{"id":"ytZ2.cpp","timestamp":1715094097058},{"id":"kW7G.cpp","timestamp":1715094149591},{"id":"o8fO.cpp","timestamp":1715094161481},{"id":"kNbA.cpp","timestamp":1715094174204},{"id":"YgWr.cpp","timestamp":1715094302143},{"id":"SWcL.cpp","timestamp":1715094312359},{"id":"edb6.cpp","timestamp":1715094334840},{"id":"AJ3p.cpp","timestamp":1715094346086},{"id":"T3HD.cpp","timestamp":1715094493468}]}
|
25
.config/Code/User/History/-78f4582a/eqvz.cpp
Normal file
25
.config/Code/User/History/-78f4582a/eqvz.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class YellowFood : public Food{
|
||||
|
||||
const int dimension = 20;
|
||||
|
||||
public:
|
||||
|
||||
YellowFood(int x, int y) : Food(x, y, colors[YELLOW]){}
|
||||
void draw() override{
|
||||
DrawSquare(x, y, dimension, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball**& balls) override{
|
||||
if(Food::counter == 0){
|
||||
for(int i=0;i<3;i++){
|
||||
if(balls[i] == nullptr){
|
||||
balls[i] = new Ball()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
~YellowFood(){}
|
||||
|
||||
};
|
19
.config/Code/User/History/-78f4582a/fny1.cpp
Normal file
19
.config/Code/User/History/-78f4582a/fny1.cpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class YellowFood : public Food{
|
||||
|
||||
const int dimension = 20;
|
||||
|
||||
public:
|
||||
|
||||
YellowFood(int x, int y) : Food(x, y, colors[YELLOW]){}
|
||||
void draw() override{
|
||||
DrawSquare(x, y, dimension, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball& ball) override{
|
||||
Ball *ball1 = new Ball();
|
||||
}
|
||||
~YellowFood(){}
|
||||
|
||||
};
|
34
.config/Code/User/History/-78f4582a/kNbA.cpp
Normal file
34
.config/Code/User/History/-78f4582a/kNbA.cpp
Normal file
|
@ -0,0 +1,34 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class YellowFood : public Food{
|
||||
|
||||
const int dimension = 20;
|
||||
|
||||
public:
|
||||
|
||||
YellowFood(int x, int y) : Food(x, y, colors[YELLOW]){}
|
||||
void draw() override{
|
||||
DrawSquare(x, y, dimension, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball**& balls) override{
|
||||
if(Food::counter == 0){
|
||||
int ballX, ballY;
|
||||
float *ballColor;
|
||||
for(int i=0;i<3;i++){
|
||||
if(balls[i] != nullptr){
|
||||
ballX = balls[i]->getX();
|
||||
ballY = balls[i]->getY();
|
||||
ballColor = balls[i]->getColor();
|
||||
}
|
||||
}
|
||||
for(int i=0;i<3;i++){
|
||||
if(balls[i] == nullptr){
|
||||
balls[i] = new Ball(ballX, ballY, 10, ballColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
~YellowFood(){}
|
||||
|
||||
};
|
34
.config/Code/User/History/-78f4582a/kW7G.cpp
Normal file
34
.config/Code/User/History/-78f4582a/kW7G.cpp
Normal file
|
@ -0,0 +1,34 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class YellowFood : public Food{
|
||||
|
||||
const int dimension = 20;
|
||||
|
||||
public:
|
||||
|
||||
YellowFood(int x, int y) : Food(x, y, colors[YELLOW]){}
|
||||
void draw() override{
|
||||
DrawSquare(x, y, dimension, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball**& balls) override{
|
||||
if(Food::counter == 0){
|
||||
int ballX, ballY;
|
||||
float *color;
|
||||
for(int i=0;i<3;i++){
|
||||
if(balls[i] != nullptr){
|
||||
ballX = balls[i]->getX();
|
||||
ballY = balls[i]->getY();
|
||||
color = balls[i]->getColor();
|
||||
}
|
||||
}
|
||||
for(int i=0;i<3;i++){
|
||||
if(balls[i] == nullptr){
|
||||
balls[i] = new Ball(ballX, ballY, ballColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
~YellowFood(){}
|
||||
|
||||
};
|
19
.config/Code/User/History/-78f4582a/kpEH.cpp
Normal file
19
.config/Code/User/History/-78f4582a/kpEH.cpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class YellowFood : public Food{
|
||||
|
||||
const int dimension = 20;
|
||||
|
||||
public:
|
||||
|
||||
YellowFood(int x, int y) : Food(x, y, colors[YELLOW]){}
|
||||
void draw() override{
|
||||
DrawSquare(x, y, dimension, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball& ball, Ball*& ball1, Ball*& ball2) override{
|
||||
|
||||
}
|
||||
~YellowFood(){}
|
||||
|
||||
};
|
18
.config/Code/User/History/-78f4582a/nuG9.cpp
Normal file
18
.config/Code/User/History/-78f4582a/nuG9.cpp
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class YellowFood : public Food{
|
||||
|
||||
const int dimension = 20;
|
||||
|
||||
public:
|
||||
|
||||
YellowFood(int x, int y) : Food(x, y, colors[YELLOW]){}
|
||||
void draw() override{
|
||||
DrawSquare(x, y, dimension, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball& ball) override{
|
||||
}
|
||||
~YellowFood(){}
|
||||
|
||||
};
|
34
.config/Code/User/History/-78f4582a/o8fO.cpp
Normal file
34
.config/Code/User/History/-78f4582a/o8fO.cpp
Normal file
|
@ -0,0 +1,34 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class YellowFood : public Food{
|
||||
|
||||
const int dimension = 20;
|
||||
|
||||
public:
|
||||
|
||||
YellowFood(int x, int y) : Food(x, y, colors[YELLOW]){}
|
||||
void draw() override{
|
||||
DrawSquare(x, y, dimension, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball**& balls) override{
|
||||
if(Food::counter == 0){
|
||||
int ballX, ballY;
|
||||
float *ballColor;
|
||||
for(int i=0;i<3;i++){
|
||||
if(balls[i] != nullptr){
|
||||
ballX = balls[i]->getX();
|
||||
ballY = balls[i]->getY();
|
||||
ballColor = balls[i]->getColor();
|
||||
}
|
||||
}
|
||||
for(int i=0;i<3;i++){
|
||||
if(balls[i] == nullptr){
|
||||
balls[i] = new Ball(ballX, ballY, ballColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
~YellowFood(){}
|
||||
|
||||
};
|
21
.config/Code/User/History/-78f4582a/pfKk.cpp
Normal file
21
.config/Code/User/History/-78f4582a/pfKk.cpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class YellowFood : public Food{
|
||||
|
||||
const int dimension = 20;
|
||||
|
||||
public:
|
||||
|
||||
YellowFood(int x, int y) : Food(x, y, colors[YELLOW]){}
|
||||
void draw() override{
|
||||
DrawSquare(x, y, dimension, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball**& balls) override{
|
||||
if(Food::counter == 0){
|
||||
|
||||
}
|
||||
}
|
||||
~YellowFood(){}
|
||||
|
||||
};
|
33
.config/Code/User/History/-78f4582a/ytZ2.cpp
Normal file
33
.config/Code/User/History/-78f4582a/ytZ2.cpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class YellowFood : public Food{
|
||||
|
||||
const int dimension = 20;
|
||||
|
||||
public:
|
||||
|
||||
YellowFood(int x, int y) : Food(x, y, colors[YELLOW]){}
|
||||
void draw() override{
|
||||
DrawSquare(x, y, dimension, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball**& balls) override{
|
||||
if(Food::counter == 0){
|
||||
int ballX, ballY;
|
||||
float *color;
|
||||
for(int i=0;i<3;i++){
|
||||
if(balls[i] != nullptr){
|
||||
ballX = balls[i]->getX();
|
||||
ballY = balls[i]->getY();
|
||||
}
|
||||
}
|
||||
for(int i=0;i<3;i++){
|
||||
if(balls[i] == nullptr){
|
||||
balls[i] = new Ball(ballX, ballY);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
~YellowFood(){}
|
||||
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue