Well, the plan as far as that goes was to define the starting position and write a function for each room and embed within it functions that allowed the player to increase or decrease each function by certain amounts depending on what room they're in (so for example, the clinic would allow the player to increase the north variable and the east variable, but not decrease them, or modify the up or down variable because there are no stairs in that room.
Originally Posted by manasij7479
As for why I didn't use an array, well, I started to code that, but it just came out as the equivalent of defining a bunch of variables so that I'd end up with a pile of player cins re-defining them, which is a lot harder to keep track of. Here's the code I started for that:
Now if it was possible to embed functions within those array locations and not just a list of numbers and write a function that was capable of moving the player between locations in the three dimensional array, I'd love to, but I've yet to see a really clear description of how to do that. (Note, I would probably be eternally grateful if you could provide such a thing).
//int room; //new plan, there will be 12 rooms total, the first dimension of the array is north and south, the second dimmension is east and west, the third dimension will be up and down the planned layout is on the following lines:
// [Meeting Room (north west ) abbreviation: 2] [Tiller's Lab (north east) abbreviation: 3]
// [clinic (south west ) abbreviation: 1] [Office/Beds (south east) abbreviation: 4]
// okay, maybe the abbreviations I have above are not as useful for tracking where the player is, but it might be useful for tracking the condition of each room (if something has happened before, rendering it different due to player actions)
// Plan: 1 will be the clinic, 2 will be the meeting room, and so on. It will be important to update this list to keep them clear.