revisió de capçaleres

This commit is contained in:
2025-05-29 09:58:23 +02:00
parent 677e4d465d
commit 0fc8224ef8
45 changed files with 1870 additions and 2684 deletions

View File

@@ -3,13 +3,13 @@
#include "balloon.h" // Para BALLOON_VELX_NEGATIVE, BALLOON_VELX_POSITIVE
#include <vector>
// Constantes de configuración
// --- Constantes de configuración ---
constexpr int NUMBER_OF_BALLOON_FORMATIONS = 100;
constexpr int MAX_NUMBER_OF_BALLOONS_IN_A_FORMATION = 50;
constexpr int NUMBER_OF_SETS_PER_POOL = 10;
constexpr int NUMBER_OF_STAGES = 10;
// Estructuras de datos
// --- Estructuras de datos ---
struct BalloonFormationParams
{
int x = 0; // Posición en el eje X donde crear el globo
@@ -42,30 +42,29 @@ struct BalloonFormationUnit
using BalloonFormationPool = std::vector<const BalloonFormationUnit *>;
// Clase BalloonFormations
// --- Clase BalloonFormations ---
class BalloonFormations
{
public:
// Constructor
// --- Constructor y destructor ---
BalloonFormations()
{
initBalloonFormations();
initBalloonFormationPools();
}
// Destructor
~BalloonFormations() = default;
// Getters
// --- Getters ---
const BalloonFormationPool &getPool(int pool) { return balloon_formation_pool_.at(pool); }
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:
// --- Datos ---
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
// --- Métodos internos de inicialización ---
void initBalloonFormations();
void initBalloonFormationPools();
};