This commit is contained in:
2026-04-18 07:48:05 +02:00
parent 20b9a95619
commit 34a41ad25c
22 changed files with 97 additions and 79 deletions

View File

@@ -4,9 +4,9 @@
#include <stdlib.h> // for rand
#include <algorithm> // for max, min
#include <numeric> // for accumulate
#include <fstream> // for basic_ifstream
#include <iostream> // for basic_ostream, char_traits, operator<<
#include <numeric> // for accumulate
#include "core/audio/jail_audio.hpp" // for JA_PlaySound, JA_DeleteSound, JA_LoadSound
#include "core/input/global_inputs.hpp" // for GlobalInputs::handle
@@ -2184,8 +2184,7 @@ void Game::updateDeathSequence() {
// Calcula y establece el valor de amenaza en funcion de los globos activos
void Game::evaluateAndSetMenace() {
menaceCurrent = std::accumulate(balloons.begin(), balloons.end(), Uint8(0),
[](Uint8 acc, Balloon *b) { return b->isEnabled() ? acc + b->getMenace() : acc; });
menaceCurrent = std::accumulate(balloons.begin(), balloons.end(), Uint8(0), [](Uint8 acc, Balloon *b) { return b->isEnabled() ? acc + b->getMenace() : acc; });
}
// Obtiene el valor de la variable
@@ -3048,8 +3047,7 @@ bool Game::canPowerBallBeCreated() {
// Calcula el poder actual de los globos en pantalla
int Game::calculateScreenPower() {
return std::accumulate(balloons.begin(), balloons.end(), 0,
[](int acc, Balloon *b) { return b->isEnabled() ? acc + b->getPower() : acc; });
return std::accumulate(balloons.begin(), balloons.end(), 0, [](int acc, Balloon *b) { return b->isEnabled() ? acc + b->getPower() : acc; });
}
// Inicializa las variables que contienen puntos de ruta para mover objetos