fix: bucles cap a ranges algorithms (38 troballes)
This commit is contained in:
@@ -38,9 +38,9 @@ GameOver::GameOver()
|
||||
|
||||
// Inicializa el vector de colores (de brillante a oscuro para fade)
|
||||
const std::vector<std::string> COLORS = {"white", "yellow", "cyan", "green", "magenta", "red", "blue", "black"};
|
||||
for (const auto& color : COLORS) {
|
||||
colors_.push_back(stringToColor(color));
|
||||
}
|
||||
colors_.reserve(COLORS.size());
|
||||
std::ranges::transform(COLORS, std::back_inserter(colors_),
|
||||
[](const auto& color) { return stringToColor(color); });
|
||||
color_ = colors_.back(); // Empieza en black
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user