fixed highscores

This commit is contained in:
2025-12-21 21:17:58 +01:00
parent 494f906435
commit fb82ac06d0
6 changed files with 281 additions and 10 deletions

View File

@ -1406,11 +1406,14 @@ void ApplicationManager::setupStateHandlers() {
if (m_stateContext.game->isGameOver()) {
// Submit score before transitioning
if (m_stateContext.scores) {
std::string gt = (m_stateContext.game->getMode() == GameMode::Challenge) ? "challenge" : "classic";
m_stateContext.scores->submit(
m_stateContext.game->score(),
m_stateContext.game->lines(),
m_stateContext.game->level(),
m_stateContext.game->elapsed()
m_stateContext.game->elapsed(),
std::string("PLAYER"),
gt
);
}
m_stateManager->setState(AppState::GameOver);