test
This commit is contained in:
parent
37776af5db
commit
ab03d5f10c
4045 changed files with 286212 additions and 3 deletions
23
.config/Code/User/History/-4cd684d9/5Qnl.cpp
Normal file
23
.config/Code/User/History/-4cd684d9/5Qnl.cpp
Normal file
|
@ -0,0 +1,23 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
const int height = 20;
|
||||
const int width = 10;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y) : Food(x, y, colors[GREEN]){}
|
||||
|
||||
void draw() override{
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
|
||||
void activatePowerup(Paddle& paddle, Ball& ball) override{
|
||||
|
||||
}
|
||||
|
||||
~GreenFood(){}
|
||||
|
||||
};
|
22
.config/Code/User/History/-4cd684d9/7Bdr.cpp
Normal file
22
.config/Code/User/History/-4cd684d9/7Bdr.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
int height;
|
||||
int width;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y, int width, int height, float *color) : width(width), height(height), Food(x, y, color){}
|
||||
|
||||
void draw(){
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
void fall(){
|
||||
y -= 5;
|
||||
}
|
||||
|
||||
~GreenFood(){}
|
||||
|
||||
};
|
23
.config/Code/User/History/-4cd684d9/8Qid.cpp
Normal file
23
.config/Code/User/History/-4cd684d9/8Qid.cpp
Normal file
|
@ -0,0 +1,23 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
const int height = 20;
|
||||
const int width = 10;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y) : Food(x, y, colors[GREEN]){}
|
||||
|
||||
void draw() override{
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
|
||||
void activatePowerup(Paddle& paddle, Ball& ball) override{
|
||||
paddle.setWidth(paddle.getWidth()*2);
|
||||
}
|
||||
|
||||
~GreenFood(){}
|
||||
|
||||
};
|
22
.config/Code/User/History/-4cd684d9/9TsP.cpp
Normal file
22
.config/Code/User/History/-4cd684d9/9TsP.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
const int height = 20;
|
||||
const int width = 10;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y, float *color) : Food(x, y, color){}
|
||||
|
||||
void draw(){
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
void fall(){
|
||||
y -= 5;
|
||||
}
|
||||
|
||||
~GreenFood(){}
|
||||
|
||||
};
|
19
.config/Code/User/History/-4cd684d9/Cx7L.cpp
Normal file
19
.config/Code/User/History/-4cd684d9/Cx7L.cpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
const int height = 20;
|
||||
const int width = 10;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y) : Food(x, y, colors[GREEN]){}
|
||||
|
||||
void draw() override{
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
|
||||
~GreenFood(){}
|
||||
|
||||
};
|
22
.config/Code/User/History/-4cd684d9/EUjz.cpp
Normal file
22
.config/Code/User/History/-4cd684d9/EUjz.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
const int height = 10;
|
||||
const int width = 5;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y, float *color) : Food(x, y, color){}
|
||||
|
||||
void draw(){
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
void fall(){
|
||||
y -= 5;
|
||||
}
|
||||
|
||||
~GreenFood(){}
|
||||
|
||||
};
|
26
.config/Code/User/History/-4cd684d9/HcSX.cpp
Normal file
26
.config/Code/User/History/-4cd684d9/HcSX.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
const int height = 20;
|
||||
const int width = 10;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y) : Food(x, y, colors[GREEN]){}
|
||||
|
||||
void draw() override{
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
|
||||
void activatePowerup(Paddle& paddle, Ball& ball) override{
|
||||
if(Food::counter == 0){
|
||||
paddle.setWidth(paddle.getWidth()*2);
|
||||
powerActive = true;
|
||||
}
|
||||
}
|
||||
|
||||
~GreenFood(){}
|
||||
|
||||
};
|
26
.config/Code/User/History/-4cd684d9/JxWo.cpp
Normal file
26
.config/Code/User/History/-4cd684d9/JxWo.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
const int height = 20;
|
||||
const int width = 10;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y) : Food(x, y, colors[GREEN]){}
|
||||
|
||||
void draw() override{
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
|
||||
void activatePowerup(Paddle& paddle, Ball& ball) override{
|
||||
// if(Food::counter == 0){
|
||||
// paddle.setWidth(paddle.getWidth()*2);
|
||||
// powerActive = true;
|
||||
// }
|
||||
}
|
||||
|
||||
~GreenFood(){}
|
||||
|
||||
};
|
25
.config/Code/User/History/-4cd684d9/Lce1.cpp
Normal file
25
.config/Code/User/History/-4cd684d9/Lce1.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
const int height = 20;
|
||||
const int width = 10;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y) : Food(x, y, colors[GREEN]){}
|
||||
|
||||
void draw() override{
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
|
||||
void activatePowerup(Paddle& paddle, Ball**& balls) override{
|
||||
if(Food::counter == 0){
|
||||
if(paddle.getWidth() < 250) paddle.setWidth(paddle.getWidth()*2);
|
||||
}
|
||||
}
|
||||
|
||||
~GreenFood(){}
|
||||
|
||||
};
|
16
.config/Code/User/History/-4cd684d9/N4YD.cpp
Normal file
16
.config/Code/User/History/-4cd684d9/N4YD.cpp
Normal file
|
@ -0,0 +1,16 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
int height;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y, int height, float *color) : height(height), Food(x, y, color){}
|
||||
|
||||
void draw(){
|
||||
|
||||
}
|
||||
|
||||
};
|
22
.config/Code/User/History/-4cd684d9/ND8s.cpp
Normal file
22
.config/Code/User/History/-4cd684d9/ND8s.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
const int height = 20;
|
||||
const int width = 10;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y) : Food(x, y, colors[GREEN]){}
|
||||
|
||||
void draw(){
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
void fall(){
|
||||
y -= 5;
|
||||
}
|
||||
|
||||
~GreenFood(){}
|
||||
|
||||
};
|
26
.config/Code/User/History/-4cd684d9/PkdU.cpp
Normal file
26
.config/Code/User/History/-4cd684d9/PkdU.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
const int height = 20;
|
||||
const int width = 10;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y) : Food(x, y, colors[GREEN]){}
|
||||
|
||||
void draw() override{
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
|
||||
void activatePowerup(Paddle& paddle, Ball**& balls) override{
|
||||
if(Food::counter == 0){
|
||||
paddle.setWidth(250);
|
||||
powerActive = true;
|
||||
}
|
||||
}
|
||||
|
||||
~GreenFood(){}
|
||||
|
||||
};
|
26
.config/Code/User/History/-4cd684d9/QcUG.cpp
Normal file
26
.config/Code/User/History/-4cd684d9/QcUG.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
const int height = 20;
|
||||
const int width = 10;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y) : Food(x, y, colors[GREEN]){}
|
||||
|
||||
void draw() override{
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
|
||||
void activatePowerup(Paddle& paddle, Ball**& balls) override{
|
||||
if(Food::counter == 0){
|
||||
paddle.setWidth(paddle.getWidth()*2);
|
||||
// powerActive = true;
|
||||
}
|
||||
}
|
||||
|
||||
~GreenFood(){}
|
||||
|
||||
};
|
20
.config/Code/User/History/-4cd684d9/RgxD.cpp
Normal file
20
.config/Code/User/History/-4cd684d9/RgxD.cpp
Normal file
|
@ -0,0 +1,20 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
int height;
|
||||
int width;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y, int width, int height, float *color) : width(width), height(height), Food(x, y, color){}
|
||||
|
||||
void draw(){
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
void fall(){
|
||||
y -= 5;
|
||||
}
|
||||
|
||||
};
|
23
.config/Code/User/History/-4cd684d9/SFSe.cpp
Normal file
23
.config/Code/User/History/-4cd684d9/SFSe.cpp
Normal file
|
@ -0,0 +1,23 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
const int height = 20;
|
||||
const int width = 10;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y) : Food(x, y, colors[GREEN]){}
|
||||
|
||||
void draw() override{
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
|
||||
void activatePowerup(Paddle& paddle, Ball& ball) override{
|
||||
if(Food::counter == 0) paddle.setWidth(paddle.getWidth()*2);
|
||||
}
|
||||
|
||||
~GreenFood(){}
|
||||
|
||||
};
|
17
.config/Code/User/History/-4cd684d9/SKaa.cpp
Normal file
17
.config/Code/User/History/-4cd684d9/SKaa.cpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
int height;
|
||||
int width;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y, int width, int height, float *color) : width(width), height(height), Food(x, y, color){}
|
||||
|
||||
void draw(){
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
|
||||
};
|
9
.config/Code/User/History/-4cd684d9/SNN3.cpp
Normal file
9
.config/Code/User/History/-4cd684d9/SNN3.cpp
Normal file
|
@ -0,0 +1,9 @@
|
|||
#include "Food.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
19
.config/Code/User/History/-4cd684d9/a3ri.cpp
Normal file
19
.config/Code/User/History/-4cd684d9/a3ri.cpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
const int height = 20;
|
||||
const int width = 10;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y) : Food(x, y, colors[GREEN]){}
|
||||
|
||||
void draw(){
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
|
||||
~GreenFood(){}
|
||||
|
||||
};
|
23
.config/Code/User/History/-4cd684d9/aguY.cpp
Normal file
23
.config/Code/User/History/-4cd684d9/aguY.cpp
Normal file
|
@ -0,0 +1,23 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
const int height = 20;
|
||||
const int width = 10;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y) : Food(x, y, colors[GREEN]){}
|
||||
|
||||
void draw() override{
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
|
||||
void activatePowerup(Paddle& paddle, Ball& ball) override{
|
||||
|
||||
}
|
||||
|
||||
~GreenFood(){}
|
||||
|
||||
};
|
1
.config/Code/User/History/-4cd684d9/entries.json
Normal file
1
.config/Code/User/History/-4cd684d9/entries.json
Normal file
|
@ -0,0 +1 @@
|
|||
{"version":1,"resource":"file:///home/rafayahmad/Stuff/OOP/Project/GreenFood.cpp","entries":[{"id":"vlrn.cpp","timestamp":1714700960002},{"id":"SNN3.cpp","timestamp":1714700987840},{"id":"j9T8.cpp","timestamp":1714701019626},{"id":"p5fd.cpp","timestamp":1714701069105},{"id":"oScw.cpp","timestamp":1714701083390},{"id":"N4YD.cpp","timestamp":1714701111128},{"id":"fIRJ.cpp","timestamp":1714701145343},{"id":"r4gr.cpp","timestamp":1714701169057},{"id":"SKaa.cpp","timestamp":1714701225956},{"id":"RgxD.cpp","timestamp":1714701285292},{"id":"7Bdr.cpp","timestamp":1714701318723},{"id":"mwt9.cpp","timestamp":1714701435755},{"id":"EUjz.cpp","timestamp":1714701465429},{"id":"9TsP.cpp","timestamp":1714702236685},{"id":"ND8s.cpp","timestamp":1714702473258},{"id":"a3ri.cpp","timestamp":1714702525274},{"id":"Cx7L.cpp","timestamp":1714702743227},{"id":"5Qnl.cpp","timestamp":1714888721264},{"id":"aguY.cpp","timestamp":1714888959253},{"id":"8Qid.cpp","timestamp":1714889024466},{"id":"hg84.cpp","timestamp":1714889045133},{"id":"ewGJ.cpp","timestamp":1714889057666},{"id":"SFSe.cpp","timestamp":1714889095623},{"id":"za5K.cpp","timestamp":1714889620175},{"id":"JxWo.cpp","timestamp":1714896504457},{"id":"HcSX.cpp","timestamp":1714896704795},{"id":"iodW.cpp","timestamp":1714974830972},{"id":"xsOa.cpp","timestamp":1715074668513},{"id":"PkdU.cpp","timestamp":1715138510931},{"id":"sCBe.cpp","timestamp":1715146180209},{"id":"QcUG.cpp","timestamp":1715146363531},{"id":"wXyc.cpp","timestamp":1715146389062},{"id":"vJkI.cpp","timestamp":1715146537761},{"id":"Lce1.cpp","timestamp":1715147322024},{"id":"vg9f.cpp","timestamp":1715182392624}]}
|
23
.config/Code/User/History/-4cd684d9/ewGJ.cpp
Normal file
23
.config/Code/User/History/-4cd684d9/ewGJ.cpp
Normal file
|
@ -0,0 +1,23 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
const int height = 20;
|
||||
const int width = 10;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y) : Food(x, y, colors[GREEN]){}
|
||||
|
||||
void draw() override{
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
|
||||
void activatePowerup(Paddle& paddle, Ball& ball) override{
|
||||
paddle.setWidth(paddle.getWidth()*2);
|
||||
}
|
||||
|
||||
~GreenFood(){}
|
||||
|
||||
};
|
17
.config/Code/User/History/-4cd684d9/fIRJ.cpp
Normal file
17
.config/Code/User/History/-4cd684d9/fIRJ.cpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
int height;
|
||||
int width;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y, int height, int width, float *color) : height(height), Food(x, y, color){}
|
||||
|
||||
void draw(){
|
||||
DrawTriangle(x, y, )
|
||||
}
|
||||
|
||||
};
|
23
.config/Code/User/History/-4cd684d9/hg84.cpp
Normal file
23
.config/Code/User/History/-4cd684d9/hg84.cpp
Normal file
|
@ -0,0 +1,23 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
const int height = 20;
|
||||
const int width = 10;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y) : Food(x, y, colors[GREEN]){}
|
||||
|
||||
void draw() override{
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
|
||||
void activatePowerup(Paddle& paddle, Ball& ball) override{
|
||||
if(Food::counter == 0) paddle.setWidth(paddle.getWidth()*2);
|
||||
}
|
||||
|
||||
~GreenFood(){}
|
||||
|
||||
};
|
26
.config/Code/User/History/-4cd684d9/iodW.cpp
Normal file
26
.config/Code/User/History/-4cd684d9/iodW.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
const int height = 20;
|
||||
const int width = 10;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y) : Food(x, y, colors[GREEN]){}
|
||||
|
||||
void draw() override{
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
|
||||
void activatePowerup(Paddle& paddle, Ball& ball, Ball*& ball1, Ball*& ball2) override{
|
||||
if(Food::counter == 0){
|
||||
paddle.setWidth(paddle.getWidth()*2);
|
||||
powerActive = true;
|
||||
}
|
||||
}
|
||||
|
||||
~GreenFood(){}
|
||||
|
||||
};
|
9
.config/Code/User/History/-4cd684d9/j9T8.cpp
Normal file
9
.config/Code/User/History/-4cd684d9/j9T8.cpp
Normal file
|
@ -0,0 +1,9 @@
|
|||
#include "Food.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
int height;
|
||||
|
||||
|
||||
|
||||
};
|
22
.config/Code/User/History/-4cd684d9/mwt9.cpp
Normal file
22
.config/Code/User/History/-4cd684d9/mwt9.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
int height;
|
||||
int width;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y, float *color) : width(width), height(height), Food(x, y, color){}
|
||||
|
||||
void draw(){
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
void fall(){
|
||||
y -= 5;
|
||||
}
|
||||
|
||||
~GreenFood(){}
|
||||
|
||||
};
|
13
.config/Code/User/History/-4cd684d9/oScw.cpp
Normal file
13
.config/Code/User/History/-4cd684d9/oScw.cpp
Normal file
|
@ -0,0 +1,13 @@
|
|||
#include "Food.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
int height;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y, int height, float *color) : height(height), Food(x, y, color){}
|
||||
|
||||
|
||||
|
||||
};
|
13
.config/Code/User/History/-4cd684d9/p5fd.cpp
Normal file
13
.config/Code/User/History/-4cd684d9/p5fd.cpp
Normal file
|
@ -0,0 +1,13 @@
|
|||
#include "Food.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
int height;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y, int height) : height(height), Food(){}
|
||||
|
||||
|
||||
|
||||
};
|
17
.config/Code/User/History/-4cd684d9/r4gr.cpp
Normal file
17
.config/Code/User/History/-4cd684d9/r4gr.cpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
int height;
|
||||
int width;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y, int width, int height, float *color) : width(width), height(height), Food(x, y, color){}
|
||||
|
||||
void draw(){
|
||||
DrawTriangle(x, y, )
|
||||
}
|
||||
|
||||
};
|
26
.config/Code/User/History/-4cd684d9/sCBe.cpp
Normal file
26
.config/Code/User/History/-4cd684d9/sCBe.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
const int height = 20;
|
||||
const int width = 10;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y) : Food(x, y, colors[GREEN]){}
|
||||
|
||||
void draw() override{
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
|
||||
void activatePowerup(Paddle& paddle, Ball**& balls) override{
|
||||
if(Food::counter == 0){
|
||||
paddle.setWidth(250);
|
||||
// powerActive = true;
|
||||
}
|
||||
}
|
||||
|
||||
~GreenFood(){}
|
||||
|
||||
};
|
26
.config/Code/User/History/-4cd684d9/vJkI.cpp
Normal file
26
.config/Code/User/History/-4cd684d9/vJkI.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
const int height = 20;
|
||||
const int width = 10;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y) : Food(x, y, colors[GREEN]){}
|
||||
|
||||
void draw() override{
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
|
||||
void activatePowerup(Paddle& paddle, Ball**& balls) override{
|
||||
if(Food::counter == 0){
|
||||
if(paddle.getWidth() < 250) paddle.setWidth(paddle.getWidth()*2);
|
||||
powerActive = true;
|
||||
}
|
||||
}
|
||||
|
||||
~GreenFood(){}
|
||||
|
||||
};
|
25
.config/Code/User/History/-4cd684d9/vg9f.cpp
Normal file
25
.config/Code/User/History/-4cd684d9/vg9f.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
const int height = 20;
|
||||
const int width = 10;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y) : Food(x, y, colors[GREEN]){}
|
||||
|
||||
void draw() override{
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
|
||||
void activatePowerup(Paddle& paddle, Ball**& balls) override{
|
||||
if(Food::counter == 0){
|
||||
if(paddle.getWidth() < 240) paddle.setWidth(paddle.getWidth()*2);
|
||||
}
|
||||
}
|
||||
|
||||
~GreenFood(){}
|
||||
|
||||
};
|
9
.config/Code/User/History/-4cd684d9/vlrn.cpp
Normal file
9
.config/Code/User/History/-4cd684d9/vlrn.cpp
Normal file
|
@ -0,0 +1,9 @@
|
|||
#include "Food.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
25
.config/Code/User/History/-4cd684d9/wXyc.cpp
Normal file
25
.config/Code/User/History/-4cd684d9/wXyc.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
const int height = 20;
|
||||
const int width = 10;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y) : Food(x, y, colors[GREEN]){}
|
||||
|
||||
void draw() override{
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
|
||||
void activatePowerup(Paddle& paddle, Ball**& balls) override{
|
||||
if(Food::counter == 0){
|
||||
if(paddle.getWidth() < 250) paddle.setWidth(paddle.getWidth()*2);
|
||||
}
|
||||
}
|
||||
|
||||
~GreenFood(){}
|
||||
|
||||
};
|
26
.config/Code/User/History/-4cd684d9/xsOa.cpp
Normal file
26
.config/Code/User/History/-4cd684d9/xsOa.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
const int height = 20;
|
||||
const int width = 10;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y) : Food(x, y, colors[GREEN]){}
|
||||
|
||||
void draw() override{
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
|
||||
void activatePowerup(Paddle& paddle, Ball**& balls) override{
|
||||
if(Food::counter == 0){
|
||||
paddle.setWidth(paddle.getWidth()*2);
|
||||
powerActive = true;
|
||||
}
|
||||
}
|
||||
|
||||
~GreenFood(){}
|
||||
|
||||
};
|
26
.config/Code/User/History/-4cd684d9/za5K.cpp
Normal file
26
.config/Code/User/History/-4cd684d9/za5K.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
#include "Food.h"
|
||||
#include "util.h"
|
||||
|
||||
class GreenFood : public Food{
|
||||
|
||||
const int height = 20;
|
||||
const int width = 10;
|
||||
|
||||
public:
|
||||
|
||||
GreenFood(int x, int y) : Food(x, y, colors[GREEN]){}
|
||||
|
||||
void draw() override{
|
||||
DrawTriangle(x, y, x-width, y+height, x+width, y+height, color);
|
||||
}
|
||||
|
||||
void activatePowerup(Paddle& paddle, Ball& ball) override{
|
||||
if(Food::counter == 0){
|
||||
paddle.setWidth(paddle.getWidth()*2);
|
||||
powerActive = true;
|
||||
}
|
||||
}
|
||||
|
||||
~GreenFood(){}
|
||||
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue