This commit is contained in:
2025-10-27 17:39:23 +01:00
parent aacb14149f
commit b1dca32a5b
18 changed files with 774 additions and 565 deletions

View File

@@ -1,14 +1,10 @@
#include "game/gameplay/room_tracker.hpp"
#include <algorithm> // Para std::ranges::any_of
// Comprueba si la habitación ya ha sido visitada
bool RoomTracker::hasBeenVisited(const std::string& name) {
for (const auto& l : list_) {
if (l == name) {
return true;
}
}
return false;
return std::ranges::any_of(list_, [&name](const auto& l) { return l == name; });
}
// Añade la habitación a la lista