Say I'm implementing my own version of Scrabble. I currently have a Board class that contains a lot of Squares . A Square , in turn, consists of a IBonus and a Piece . Bonus implementation is actually a regular bonus for Scrabble, but it is possible that I can try to add a new and twisted bonus to spice up the game - flexibility is of utmost importance here.

After thinking for a while, I came to the conclusion that in order to implement IBonus for work, they need to know the whole Board , as well as its current position (on the Board , so she knows where it is, and he can check an item that is on the same area as a bonus). This seems bad to me, because basically he needs to know a lot of information.
So, my naive implementation would be to pass the Board argument as the IBonus.calculate() , IBonus.calculate(Board board, Point position) method, which is.
In addition, a circular reference is created. Or I'm wrong? 
I do not particularly like this approach, so I am looking for other possible approaches. I know that I can do calculate reception of an interface instead of a specific class, i.e. calculate(IBoard board) , but I'm IMO, which is not so much better than the first case.
I am afraid to be too focused on my current implementation to be able to think of a whole variety of different projects that can fit, at least as well as solutions to this problem. Maybe I could redesign the whole game and get bonuses elsewhere to facilitate this calculation? Maybe I'm too focused on getting them on Board ? Of course, I hope that there are other approaches to this problem!
thanks
java c # oop architecture software-design
devoured elysium
source share