 <p>Your problem is thinking of the state as being all the permutations of what people can see. In general you should just be thinking of the state as the facts of the situation, and calculate individual views of those facts as they are needed.</p> <pre><code>// pseudocode - make it properly object oriented for best results struct player { int teamNumber; bool hidden; }; bool is_friend(player other_guy) { return me.teamNumber == other_guy.teamNumber; } bool can_see(player other_guy) { return (is_friend(other_guy) || !other_guy.hidden); } </code></pre> <p>If one player (eg, A) cannot see another player (eg. B), then you just don't send player B's information to player A until the situation changes.</p>