Mark cells explored without changing what is currently visible: the
shroud-clearing half of sync, for effects (a revealed map, a scouted
region) that lift the shroud where no unit stands watch.
One faction's sight as a predicate, ready to hand to anything that asks what a side can see -
ai's score views, for one. It reads the shroud as it is when called, not as it was when the
predicate was made, so a caller holding one across a sync sees the update, and it follows
whatever share the faction later joins.
Makes these factions see with one pair of eyes: each one's cells count as the others', both for what is visible now and for the shroud they remember.
Calling it again widens the group rather than replacing it, so share(['blue', 'green'])
after share(['green', 'teal']) leaves all three on one map. A side may also be told to share
with itself, or with nobody at all, without harm.
Unions the visible cells of several units for each faction and retains explored memory. The caller supplies visibility because board games differ in terrain, range, and blockers.
Factions that
sharesee through one another's eyes - one map for the group, what is lit now and what they remember having seen, which is what Wesnoth'sshare_visionmeans. Nothing shares until asked, and sharing is a property of the sides rather than of any unit, so it survives everysync.Example