claude: arreglos d'estil

This commit is contained in:
2025-08-16 19:48:32 +02:00
parent 1ced698093
commit ada5025c65
62 changed files with 903 additions and 1102 deletions

View File

@@ -6,10 +6,10 @@
#include "utils.h" // Para trim
// Tamaño máximo del nombre
constexpr size_t NAME_SIZE = 5;
// --- Constantes ---
constexpr size_t NAME_SIZE = 5; // Tamaño máximo del nombre
// Clase EnterName
// --- Clase EnterName: gestor de entrada de nombre del jugador ---
class EnterName {
public:
EnterName();
@@ -29,11 +29,12 @@ class EnterName {
[[nodiscard]] auto getPositionOverflow() const -> bool { return position_overflow_; } // Indica si la posición excede el límite
private:
// --- Variables de estado ---
std::string character_list_; // Lista de caracteres permitidos
std::string name_; // Nombre en proceso
std::array<int, NAME_SIZE> character_index_; // Índices a "character_list_"
size_t position_ = 0; // Índice del carácter que se edita
bool position_overflow_ = false; // Flag para exceder límite
std::array<int, NAME_SIZE> character_index_; // Índices a "character_list_"
void updateNameFromCharacterIndex(); // Actualiza "name_" según "character_index_"
void initCharacterIndex(const std::string &name); // Inicializa índices desde el nombre