Greetings, I am a newb that is trying to make a text-based game to learn programming and as an entry point to game development. I'm not a conventional learner and struggle to understand grammatically correct explanations of how things work, like Java-docs with all their terminology ( only serves to confuse me ) and instead tend to do better with a hands on approach. That's not to say I haven't done my fair share of research and seemingly endless hours of YouTube tutorials and alike. I digress, I'll get to my point.

I'm struggling to get my head around how to tackle world design and movement in a text-based environment. I would like to have a somewhat dynamic world so each play through is different and would like to be flexible in terms of how the player navigates the world; As in not having to follow a strict path of events. Each time the player moved there would be a chance to trigger an event like being attacked and each move would not take the player to a predefined location like a house. I don't know how I would keep track of this empty space in relation to other objects like a house. It's just melting my brain at this point..

Do I use some sort of multidimensional array or perhaps an XML file which contains visit able locations and their relative contents?

Any input/direction would be appreciated.

Thanks!