I'm programming a card game (of Uno / Mau Mau type) and my "problem" is as follows:
The high level AI players can cheat by being able to check what cards the other players have in their hands. Two solutions come to my mind:
1) Add getters to players, these getters would be used to access the cards held by players. However, this would break the "accessors are evil" principle.
2) The high level AI players would be observers observing the other players. Whenever a player draws a card, they will notify the observers and send them the drawn card as a parameter of the notify method. The observers can then decide to either "remember" the card and who played it or to ignore it. This would make it easy for the AI players to check a given percentage of other players' cards (anywhere from 0 to 100% of opponents' cards).
Could you please tell me which option is better OOP or can you come with a different solution?