test
This commit is contained in:
parent
37776af5db
commit
ab03d5f10c
4045 changed files with 286212 additions and 3 deletions
24
.config/Code/User/History/-372b010b/D9pR.cpp
Normal file
24
.config/Code/User/History/-372b010b/D9pR.cpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class RedFood : public Food{
|
||||
|
||||
const int width = 20;
|
||||
const int height = 10;
|
||||
|
||||
public:
|
||||
|
||||
RedFood(int x, int y) : Food(x, y, colors[RED]){}
|
||||
void draw() override{
|
||||
DrawRectangle(x, y , width, height, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball& ball) override{
|
||||
if(Food::counter == 0){
|
||||
ball.setVX(ball.getVX() < 0 ? -3 : 3);
|
||||
ball.setVY(ball.getVY() < 0 ? -3 : 3);
|
||||
powerActive = true;
|
||||
}
|
||||
}
|
||||
~RedFood(){}
|
||||
|
||||
};
|
14
.config/Code/User/History/-372b010b/IuYP.cpp
Normal file
14
.config/Code/User/History/-372b010b/IuYP.cpp
Normal file
|
@ -0,0 +1,14 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class RedFood : public Food{
|
||||
|
||||
const int width = 20;
|
||||
const int height = 10;
|
||||
|
||||
public:
|
||||
|
||||
RedFood(int x, int y) : Food(x, y, colors[RED]){}
|
||||
|
||||
|
||||
};
|
24
.config/Code/User/History/-372b010b/MbM4.cpp
Normal file
24
.config/Code/User/History/-372b010b/MbM4.cpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class RedFood : public Food{
|
||||
|
||||
const int width = 20;
|
||||
const int height = 10;
|
||||
|
||||
public:
|
||||
|
||||
RedFood(int x, int y) : Food(x, y, colors[RED]){}
|
||||
void draw() override{
|
||||
DrawRectangle(x, y , width, height, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball**& balls) override{
|
||||
if(Food::counter == 0){
|
||||
ball.setVX(ball.getVX() < 0 ? -7 : 7);
|
||||
ball.setVY(ball.getVY() < 0 ? -7 : 7);
|
||||
powerActive = true;
|
||||
}
|
||||
}
|
||||
~RedFood(){}
|
||||
|
||||
};
|
11
.config/Code/User/History/-372b010b/OBG1.cpp
Normal file
11
.config/Code/User/History/-372b010b/OBG1.cpp
Normal file
|
@ -0,0 +1,11 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class RedFood : public Food{
|
||||
|
||||
const int width = 20;
|
||||
const int height = 10;
|
||||
|
||||
|
||||
|
||||
};
|
1
.config/Code/User/History/-372b010b/entries.json
Normal file
1
.config/Code/User/History/-372b010b/entries.json
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":1,"resource":"file:///home/rafayahmad/Stuff/OOP/Project/RedFood.cpp","entries":[{"id":"gm7s.cpp","timestamp":1714703173266},{"id":"OBG1.cpp","timestamp":1714703203483},{"id":"IuYP.cpp","timestamp":1714703239430},{"id":"ihCh.cpp","timestamp":1714703268536},{"id":"qsKG.cpp","timestamp":1714889893808},{"id":"D9pR.cpp","timestamp":1714972728678},{"id":"nyqL.cpp","timestamp":1714972758275},{"id":"ldDL.cpp","timestamp":1714974741241},{"id":"MbM4.cpp","timestamp":1715074840737},{"id":"qXx7.cpp","timestamp":1715074889096}]}
|
9
.config/Code/User/History/-372b010b/gm7s.cpp
Normal file
9
.config/Code/User/History/-372b010b/gm7s.cpp
Normal file
|
@ -0,0 +1,9 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class RedFood : public Food{
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
17
.config/Code/User/History/-372b010b/ihCh.cpp
Normal file
17
.config/Code/User/History/-372b010b/ihCh.cpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class RedFood : public Food{
|
||||
|
||||
const int width = 20;
|
||||
const int height = 10;
|
||||
|
||||
public:
|
||||
|
||||
RedFood(int x, int y) : Food(x, y, colors[RED]){}
|
||||
void draw() override{
|
||||
DrawRectangle(x, y , width, height, color);
|
||||
}
|
||||
~RedFood(){}
|
||||
|
||||
};
|
24
.config/Code/User/History/-372b010b/ldDL.cpp
Normal file
24
.config/Code/User/History/-372b010b/ldDL.cpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class RedFood : public Food{
|
||||
|
||||
const int width = 20;
|
||||
const int height = 10;
|
||||
|
||||
public:
|
||||
|
||||
RedFood(int x, int y) : Food(x, y, colors[RED]){}
|
||||
void draw() override{
|
||||
DrawRectangle(x, y , width, height, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball& ball, Ball*& ball1, Ball*& ball2) override{
|
||||
if(Food::counter == 0){
|
||||
ball.setVX(ball.getVX() < 0 ? -7 : 7);
|
||||
ball.setVY(ball.getVY() < 0 ? -7 : 7);
|
||||
powerActive = true;
|
||||
}
|
||||
}
|
||||
~RedFood(){}
|
||||
|
||||
};
|
24
.config/Code/User/History/-372b010b/nyqL.cpp
Normal file
24
.config/Code/User/History/-372b010b/nyqL.cpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class RedFood : public Food{
|
||||
|
||||
const int width = 20;
|
||||
const int height = 10;
|
||||
|
||||
public:
|
||||
|
||||
RedFood(int x, int y) : Food(x, y, colors[RED]){}
|
||||
void draw() override{
|
||||
DrawRectangle(x, y , width, height, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball& ball) override{
|
||||
if(Food::counter == 0){
|
||||
ball.setVX(ball.getVX() < 0 ? -7 : 7);
|
||||
ball.setVY(ball.getVY() < 0 ? -7 : 7);
|
||||
powerActive = true;
|
||||
}
|
||||
}
|
||||
~RedFood(){}
|
||||
|
||||
};
|
28
.config/Code/User/History/-372b010b/qXx7.cpp
Normal file
28
.config/Code/User/History/-372b010b/qXx7.cpp
Normal file
|
@ -0,0 +1,28 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class RedFood : public Food{
|
||||
|
||||
const int width = 20;
|
||||
const int height = 10;
|
||||
|
||||
public:
|
||||
|
||||
RedFood(int x, int y) : Food(x, y, colors[RED]){}
|
||||
void draw() override{
|
||||
DrawRectangle(x, y , width, height, 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]->setVX(balls[i]->getVX() < 0 ? -7 : 7);
|
||||
balls[i]->setVY(balls[i]->getVY() < 0 ? -7 : 7);
|
||||
}
|
||||
}
|
||||
powerActive = true;
|
||||
}
|
||||
}
|
||||
~RedFood(){}
|
||||
|
||||
};
|
19
.config/Code/User/History/-372b010b/qsKG.cpp
Normal file
19
.config/Code/User/History/-372b010b/qsKG.cpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class RedFood : public Food{
|
||||
|
||||
const int width = 20;
|
||||
const int height = 10;
|
||||
|
||||
public:
|
||||
|
||||
RedFood(int x, int y) : Food(x, y, colors[RED]){}
|
||||
void draw() override{
|
||||
DrawRectangle(x, y , width, height, color);
|
||||
}
|
||||
void activatePowerup(Paddle& paddle, Ball& ball) override{
|
||||
}
|
||||
~RedFood(){}
|
||||
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue