liveTestDisplaces function
List<SurfaceOccupant>
liveTestDisplaces(
- SurfaceArrival arrival,
- Iterable<
SurfaceOccupant> occupants, { - String? slot,
The live-test rule (§2.2): a test is never busy. It dismisses every occupant the organic table would have it wait for — a blocking occupant, a collapsed floater under a floater test, its slot's inline occupant even if displayed — and keeps everything else. Real campaign or earlier test alike.
Implementation
List<SurfaceOccupant> liveTestDisplaces(
SurfaceArrival arrival,
Iterable<SurfaceOccupant> occupants, {
String? slot,
}) {
final row = _matrix[arrival]!;
return [
for (final occupant in occupants)
if ((row[_columnOf(occupant, slot)] ?? _Cell.show) != _Cell.show)
occupant,
];
}