Original Post
Hi everyone, For a chess game I'm creating as an example for my students I am currently using the MVC pattern. There is a BoardModel, a BoardView and a BoardController class. Currently the BoardController class depends on BoardView and BoardModel. BoardView depends on BoardModel. BoardModel is not dependant on BoardView or BoardController. BoardController delegates control of the board to one of two Player classes, depending on whose turn it is. The HumanPlayer class (subclass of Player) allows the player to first select a square of the board with a piece, and then select another square on the board to move that piece to. Here's where trouble begins: I want to provide some visual feedback of which squares the user is selecting. But this would either create a dependency of BoardView on HumanPlayer (part of the controller layer), or add the notion of which squares are selected to the BoardView class...but this notion is typical for the way a HumanPlayer controls the board since an AIPlayer just performs the move instantly. Summarizing: a certain type of control-mechanism (so not part of the model) should be visualized to the user. How would you guys handle such a case? Kind regards, Tristan