From 0adf8c63f409479aa4f5de3f2f8bfb1ee17913b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Valor=20Mart=C3=ADnez?= Date: Thu, 17 Nov 2022 16:06:31 +0100 Subject: [PATCH] Las habitaciones solo cuentan como visitadas una vez por partida --- source/game.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/game.cpp b/source/game.cpp index f7a27f4..06e2a8d 100644 --- a/source/game.cpp +++ b/source/game.cpp @@ -337,16 +337,17 @@ bool Game::changeRoom(std::string file) setScoreBoardColor(); if (roomTracker->addRoom(file)) - { // Incrementa el contador de habitaciones visitadas + { + // Incrementa el contador de habitaciones visitadas board.rooms++; + + // Actualiza las estadisticas + stats->addVisit(room->getName()); } // Pasa la nueva habitación al jugador player->setRoom(room); - // Actualiza las estadisticas - stats->addVisit(room->getName()); - return true; }