Re: Rooms and links between rooms
Oh, ok. So all rooms contain references to the rooms they're linked to. OK, I was thinking it would be good to have them decoupled, so no room knows what it is linked to, or even if it is linked, and another class keeps the linking map between the rooms.
I mean, if each room keeps a reference to the next, if we have a hallway with rooms 1-2-3-4-5, and want to change the order to 1-3-4-2-5 we would need to update all rooms. If the responsability of knowing the "map" is on another class maybe it would be easier and centralized. You could have one guy coding rooms, another one thinking about the areas and linking them. And maze building could be easier, maybe. What do you guys think? Has anyone tried something like this?
I thought about looking into codebases, but understanding it looked like too much trouble for a high-level answer on a basic topic.
|