Implementation
@override
int get countFlags {
var flags = 0;
if (visitsShouldBeCounted) flags |= CountFlags.Visits;
if (turnIndexShouldBeCounted) flags |= CountFlags.Turns;
if (countingAtStartOnly) flags |= CountFlags.CountStartOnly;
// If we're only storing CountStartOnly, it serves no purpose,
// since it's dependent on the other two to be used at all.
// (e.g. for setting the fact that *if* a gather or choice's
// content is counted, then is should only be counter at the start)
// So this is just an optimisation for storage.
if (flags == CountFlags.CountStartOnly) {
flags = 0;
}
return flags;
}