I am trying to execute a Bejeweled design. I have basically 3 classes. The Game class, which will be used by the player, the Board class, which represents the board, and the SwitchController class, which is responsible for verifying the correct selection of the desired switch on the board, by making a switch, counting the number of available switches (so I can know when the game ended, etc. .).
My current project looks something like this:
Game: isGameOver() isSwitchValid(coord1, coord2) makeSwitch(coord1, coord2) getPieceAt(coord) getBoardLength() IBoard: getPieceAt(coord) setPieceAt(coord, piece) getLength()
My idea would then have an ISwitchController :
ISwitchController: isSwitchValid(coord1, coord2) makeSwitch(coord1, coord2) getAllValidSwitches()
Here is a small diagram about how classes should be organized: 
I would have 2 different concrete IBoard classes available for use (and for each of them I would have to have an implementation of ISwitchController ).
Problem:
My program should have 2 IBoard implementations:
The first, ArrayBoard , will have all parts of the board stored in a 2D array. This is nothing special. I am defining an ArrayBoardSwitchController to manage this class.
The second, ListBoard , will have a List / Set for each color of the fragments, with all the coordinates of the parts of this color. I am defining a ListBoardSwitchController to manage this class.
The main problem here is that the implementation of SwitchController will be completely different on ArrayBoard and on ListBoard . For example, while the getAllValidSwitches() method is only needed to implement getAllValidSwitches() ArrayBoardSwitchController , it would not be a good idea to do with ListBoardSwitchController (in this class I use internal lists, because it’s easier to check if it is valid in this way).
From what I see, there are 2 different possible solutions:
I could either combine ISwitchController and IBoard interfaces. Thus, I would have two classes, a game and a council (while basically the game will be just a controller for the Council, since it will be a Council in which the game logic). It would not be so nice because the classes will not be as they could be if I had 3 different classes.
Let there be interfaces, as well as all the methods that I need to work with the public in specific classes. For example, if I need a getYellowPiecesList() , I would publish it on a ListBoard , so ListBoardSwitchController can use this. ListBoardSwitchController will only know about this because it knows that it only works against ListBoards .
What is your opinion on this? Here, the main attention is paid not so much to the design of the Bejeweled game, but to the solution of this problem, which is repeated when trying to implement the algorithms: on the one hand, you want to have a clear and good OOP design, and on the other hand it sometimes prevents you from having a reliable and efficient implementation of the algorithm.