My team and I are creating a university project. We have to create an application that emulates the famouse game Monopoly in Java. We are using JavaFX as graphic library. This is my first "big" project and now that we have got all the MVC parts completed, we need to make them communicate.
My view must update every time a player pays money or if its pawn moves on the board and in a lot of other cases. We have a GameEngine controller that relates all the Controller/Model components.
My question (that plagues me from several days) is: If I create a ViewController that gets the data from the GameEngine and then this controller updates the view, is that a MVC violation ?
Or is better to create many methods in my ViewController that updates single components that could be called by other controllers? In this case, which would be the best way to do it?
I thank you in advance and I apologize for my English.
Aucun commentaire:
Enregistrer un commentaire