canviat Options de struct a namespace

This commit is contained in:
2025-10-26 14:01:08 +01:00
parent 8f49e442de
commit df4965a84b
59 changed files with 1470 additions and 1533 deletions

View File

@@ -1,12 +1,9 @@
#include "game/gameplay/room_tracker.hpp"
// Comprueba si la habitación ya ha sido visitada
bool RoomTracker::hasBeenVisited(const std::string &name)
{
for (const auto &l : list)
{
if (l == name)
{
bool RoomTracker::hasBeenVisited(const std::string& name) {
for (const auto& l : list) {
if (l == name) {
return true;
}
}
@@ -15,11 +12,9 @@ bool RoomTracker::hasBeenVisited(const std::string &name)
}
// Añade la habitación a la lista
bool RoomTracker::addRoom(const std::string &name)
{
bool RoomTracker::addRoom(const std::string& name) {
// Comprueba si la habitación ya ha sido visitada
if (!hasBeenVisited(name))
{
if (!hasBeenVisited(name)) {
// En caso contrario añádela a la lista
list.push_back(name);
return true;