Interface representing a collection of hidden objects with visibility control.
Game can contain such collection, and it can be used to manage objects that are not visible to all players.
(eg cards in a hand, or hidden objects in a game).
Server has access to all objects, but client can only see the objects that are visible to them.
If action causes the object to change visibility, the server will send the new visibility state to all players.
Bear in mind, that if given client seen the content of object, making it hidden again can allow for cheating.
(eg player seen card with id 13 and then it is hidden again, but game client can still remember that information).
In these cases, you shoulf use function shuffleAndHide.
Interface representing a collection of hidden objects with visibility control. Game can contain such collection, and it can be used to manage objects that are not visible to all players. (eg cards in a hand, or hidden objects in a game).
Server has access to all objects, but client can only see the objects that are visible to them. If action causes the object to change visibility, the server will send the new visibility state to all players.
Bear in mind, that if given client seen the content of object, making it hidden again can allow for cheating. (eg player seen card with id 13 and then it is hidden again, but game client can still remember that information). In these cases, you shoulf use function shuffleAndHide.