Hello all,
As an exercise, I’ve been attempting to implement the popular Game of Thrones Board Game in Unity.
If you are familiar with the game, it’s like a complicated version of Diplomacy. If you aren’t familiar with that, it’s a complicated version of Risk.
Players assume the role of a great House, and the control Territories, muster Units, and so on.
My question has to do with, what is the best design practice for keeping track of (for example), which House controls which Territory? Should each House instance store a List of Territories it controls, or should each Territory reference the House which controls it? Or both?
Here is my thinking on the various options - I’d like your advice on which is the “best”, what the best-practices and design patterns are, etc. Thanks a bunch!
Keeping track from both sides sounds great, but I’m concerned about running into synchronicity issues (although I could always write code that keeps them synchronized, that feels like a hack).
Keeping track from one side (House keeps track of territories, or Territory keeps track of house) seems simpler, a bit more elegant, but at the cost of sacrificing convenience of looping through either the list of all territories or the list of all houses whenever I wanted to travel the “other” direction.
Lastly, my gameState static class could keep track of the relationships (perhaps in a Dictionary<House, List> construct) altogether and Houses and Territories wouldn’t natively know about each other and instead use the class to look things up. The advantages of course are having a centralized information handler where it would be easy to enforce synchronization, but it feels less convenient.
Anyhow, thank you for your thoughts!