Hi.
i need to work on a turn based game (backgommon). im just wondering what can be the best way for the architecture to be most flexible.
my best option is to make game logic and game state totally seperate from input and graphics and…
this is what in my mind:
make a class that holds state of the game.
make a library that queries on the game state. for example:
GetAllPossibleMoves( Player p1);
ApplyMove(Move x, Player p1);
….
On Any Plyer Input You query on Game State.
after any change on game state, apply the results on UI.
my problem is, how can i make sure that UI is exacly foloowing the game state.
queries can be tested and unit tested but whay about UI and ….
do you think its the best approach for this type of game?