....
At this point, I can suggest a simplified approach for the "cherk" process.
If the opponents have a non-empty set of common, unplayed templates,
then "cherk" from that set – purely to speed up the inconvenient procedure.
And if the unplayed templates of the opponents do not intersect, then "cherk" from
the combined set of unplayed templates.
Example 1: Non-empty intersection.
Player 1 has not played: Mask, Letos, Labyrinth
Player 2 has not played: M3, Labyrinth, Radura
We have a non-empty intersection = Labyrinth = we play Labyrinth (of course, there may be more intersections, and they will need to be "cherked")
Example 2:
Player 1 has not played: Mask, Letos, Labyrinth
Player 2 has not played: M3, Sun, Radura
There is no common intersection, we "cherk" from the list =
Mask, Letos, Labyrinth, M3, Sun, Radura
Simple, clear, and fast :)