feat(core): add centralized app constants
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
ca769dca2d
commit
03dbdd723d
40
lib/core/config/app_constants.dart
Normal file
40
lib/core/config/app_constants.dart
Normal file
@ -0,0 +1,40 @@
|
||||
/// Constantes globales de l'application, centralisées pour éviter les valeurs en dur.
|
||||
class AppConstants {
|
||||
AppConstants._();
|
||||
|
||||
/// Nombre total de Pokémon gérés (jusqu'à la Gen 9).
|
||||
static const int totalPokemon = 1025;
|
||||
|
||||
/// Points gagnés pour une bonne réponse normale.
|
||||
static const int pointsNormal = 10;
|
||||
|
||||
/// Points gagnés pour une bonne réponse sur un Pokémon shiny.
|
||||
static const int pointsShiny = 20;
|
||||
|
||||
/// Nombre de vies au début d'une partie.
|
||||
static const int startingLives = 3;
|
||||
|
||||
/// Nombre de skips au début d'une partie.
|
||||
static const int startingSkips = 3;
|
||||
|
||||
/// Nombre d'indices au début d'une partie.
|
||||
static const int startingHints = 3;
|
||||
|
||||
/// Une bonne réponse tous les N donne un indice bonus.
|
||||
static const int hintBonusEvery = 5;
|
||||
|
||||
/// Une bonne réponse tous les N donne un skip bonus.
|
||||
static const int skipBonusEvery = 10;
|
||||
|
||||
/// Probabilité d'apparition d'un shiny : 1 chance sur N.
|
||||
static const int shinyOdds = 10;
|
||||
|
||||
/// Hôte de l'API Tyradex.
|
||||
static const String apiBaseUrl = 'tyradex.app';
|
||||
|
||||
/// Chemin de l'endpoint Pokémon.
|
||||
static const String apiPokemonPath = 'api/v1/pokemon';
|
||||
|
||||
/// Clé SharedPreferences pour le meilleur score.
|
||||
static const String prefsBestScore = 'best_score';
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user