fix: detecta fitxers de puntuació corruptes

This commit is contained in:
2025-10-23 18:47:38 +02:00
parent b4624a9223
commit 245524c021
2 changed files with 158 additions and 31 deletions
+6 -1
View File
@@ -24,6 +24,10 @@ class ManageHiScoreTable {
public:
// --- Constantes ---
static constexpr int NO_ENTRY = -1;
static constexpr int FILE_VERSION = 1;
static constexpr int MAX_TABLE_SIZE = 100;
static constexpr int MAX_NAME_SIZE = 50;
static constexpr int MAX_SCORE = 999999999;
// --- Constructor y destructor ---
explicit ManageHiScoreTable(Table& table) // Constructor con referencia a tabla
@@ -41,5 +45,6 @@ class ManageHiScoreTable {
Table& table_; // Referencia a la tabla con los records
// --- Métodos privados ---
void sort(); // Ordena la tabla
void sort(); // Ordena la tabla
static auto calculateChecksum(const Table& table) -> unsigned int; // Calcula checksum de la tabla
};