10 std::mt19937 gen(rd());
12 std::uniform_int_distribution<> distribution(10, 255);
14 return distribution(gen);
18 if(super==1)
return std::make_tuple<SDL_Color,SDL_Color>(
blue);
19 if(super==2)
return std::make_tuple<SDL_Color,SDL_Color>(
lila);
20 if (counter== 1)
return std::make_tuple<SDL_Color,SDL_Color>(
green);
21 if (counter == 2)
return std::make_tuple<SDL_Color,SDL_Color>(
yellow);
22 if (counter == 3)
return std::make_tuple<SDL_Color,SDL_Color>(
red);
23 return std::make_tuple<SDL_Color,SDL_Color>({184,84,80},{248,206,204,255});
27 if(number != 1 && number!=2 && number!= 3 ) {
return 0;}
std::tuple< SDL_Color, SDL_Color > colorFromCollisionCounter(int counter, int super)
int attributionSuperPower(int number)
Brique(int x, int y, int w, int h)
Constructs a new Brique object with specified position and dimensions.
bool collided
Flag indicating whether the block has collided with another object.
int super_power
The super power level of the block.
SDL_Color color1
The primary color of the block.
SDL_Color color2
The secondary color of the block.
int collision_counter
The collision counter for the block.
void handleCollisions(point collision) override
Handles collisions with other objects.
The CollidingObject class represents a generic colliding object.
The point struct represents a point in 2D space.