Its made up of several sections:
- Game Data - Holding all the variable related to the current game state.
- Actions Lits - These are list of all the available actions in each room, along with descriptions of the actions, whether they are enabled, how many times its been called and a maximum number of times it can be called, not relevant to every action.
- Story Data - This is just arrays containing text displayed at different times to the user, and any accompanying image data to go with the text.
- Action Methods - There is a set methods that deal with performing an action, enabling, and disabling actions, and resolving the action and whatever the success and failure results.
- Popup methods - These methods deal with displaying and handling input from popup boxes displayed to the user.
- Combat methods - The methods that deal with combat.
- Stat Change methods - This is set of methods that wrap the common functionality around changing any of the main character stats.
If I was doing this c# or java I'd be able to break all of those into different classes or spread the functionality across multiple partial files without a problem. But when using them inside an angularJS controller I haven't go a scooby as to how to go about it.
Any good tips on how to proceed? I don't want to end up with one file that's over 5000 lines long.