If your βhomeβ is a grid, and you can move from any grid cell to any other grid cell, the array is in order. I assume that your peers are hinting that you may not want to move from any room to any neighboring room (and also CANNOT move from 0.0 to 42.13).
However, with a tree structure, you still cannot imagine an arbitrary set of transitions between rooms.
A more flexible approach would be the Adjacency List , which is a specialized type of graph . Think of each room as a node and give each node a list of other rooms that you can go to. With this structure, you can even allow one-way transitions (think of a one-way door from many adventure games).
pseudo code
class Room { string Name; string Description List<Room> ConnectedRooms; }
Then, introducing the symbol
class Character { string Name; Room CurrentRoom; }
To see where this character can go to:
List<Room> availableRooms = myCharacter.CurrentRoom.ConnectedRooms;
source share