pasaeta loca de clang-format (despres m'arrepentiré pero bueno)
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "balloon.h" // Para BALLOON_VELX_NEGATIVE, BALLOON_VELX_POSITIVE
|
||||
#include "balloon.h" // Para BALLOON_VELX_NEGATIVE, BALLOON_VELX_POSITIVE
|
||||
|
||||
// --- Constantes de configuración ---
|
||||
constexpr int NUMBER_OF_BALLOON_FORMATIONS = 100;
|
||||
@@ -11,14 +11,13 @@ constexpr int NUMBER_OF_SETS_PER_POOL = 10;
|
||||
constexpr int NUMBER_OF_STAGES = 10;
|
||||
|
||||
// --- Estructuras de datos ---
|
||||
struct BalloonFormationParams
|
||||
{
|
||||
int x = 0; // Posición en el eje X donde crear el globo
|
||||
int y = 0; // Posición en el eje Y donde crear el globo
|
||||
float vel_x = 0.0f; // Velocidad inicial en el eje X
|
||||
BalloonType type = BalloonType::BALLOON; // Tipo de globo
|
||||
BalloonSize size = BalloonSize::SIZE1; // Tamaño de globo
|
||||
int creation_counter = 0; // Temporizador para la creación del globo
|
||||
struct BalloonFormationParams {
|
||||
int x = 0; // Posición en el eje X donde crear el globo
|
||||
int y = 0; // Posición en el eje Y donde crear el globo
|
||||
float vel_x = 0.0f; // Velocidad inicial en el eje X
|
||||
BalloonType type = BalloonType::BALLOON; // Tipo de globo
|
||||
BalloonSize size = BalloonSize::SIZE1; // Tamaño de globo
|
||||
int creation_counter = 0; // Temporizador para la creación del globo
|
||||
|
||||
// Constructor por defecto
|
||||
BalloonFormationParams() = default;
|
||||
@@ -28,10 +27,9 @@ struct BalloonFormationParams
|
||||
: x(x_val), y(y_val), vel_x(vel_x_val), type(type_val), size(size_val), creation_counter(creation_counter_val) {}
|
||||
};
|
||||
|
||||
struct BalloonFormationUnit
|
||||
{
|
||||
int number_of_balloons; // Cantidad de globos que forman la formación
|
||||
std::vector<BalloonFormationParams> init; // Vector con todas las inicializaciones de los globos de la formación
|
||||
struct BalloonFormationUnit {
|
||||
int number_of_balloons; // Cantidad de globos que forman la formación
|
||||
std::vector<BalloonFormationParams> init; // Vector con todas las inicializaciones de los globos de la formación
|
||||
|
||||
// Constructor con parámetros
|
||||
BalloonFormationUnit(int num_balloons, const std::vector<BalloonFormationParams> &init_params)
|
||||
@@ -44,12 +42,10 @@ struct BalloonFormationUnit
|
||||
using BalloonFormationPool = std::vector<const BalloonFormationUnit *>;
|
||||
|
||||
// --- Clase BalloonFormations ---
|
||||
class BalloonFormations
|
||||
{
|
||||
public:
|
||||
class BalloonFormations {
|
||||
public:
|
||||
// --- Constructor y destructor ---
|
||||
BalloonFormations()
|
||||
{
|
||||
BalloonFormations() {
|
||||
initBalloonFormations();
|
||||
initBalloonFormationPools();
|
||||
}
|
||||
@@ -60,10 +56,10 @@ public:
|
||||
const BalloonFormationUnit &getSet(int pool, int set) { return *balloon_formation_pool_.at(pool).at(set); }
|
||||
const BalloonFormationUnit &getSet(int set) const { return balloon_formation_.at(set); }
|
||||
|
||||
private:
|
||||
private:
|
||||
// --- Datos ---
|
||||
std::vector<BalloonFormationUnit> balloon_formation_; // Vector con todas las formaciones enemigas
|
||||
std::vector<BalloonFormationPool> balloon_formation_pool_; // Conjuntos de formaciones enemigas
|
||||
std::vector<BalloonFormationUnit> balloon_formation_; // Vector con todas las formaciones enemigas
|
||||
std::vector<BalloonFormationPool> balloon_formation_pool_; // Conjuntos de formaciones enemigas
|
||||
|
||||
// --- Métodos internos de inicialización ---
|
||||
void initBalloonFormations();
|
||||
|
||||
Reference in New Issue
Block a user