tryHoldZoneFor

fun tryHoldZoneFor(holder: ZoneHolderIfc, zone: Zone, duration: Double, action: ZoneHoldActionIfc): ZoneRequest?(source)

Takes one zone for a stated duration unless it is already promised, in which case: null.

tryHoldZonesFor with one zone. The duration runs from the instant the hold begins, exactly as in holdZoneFor, so a zone that takes a while to drain is still held for its full term.

Return

the request, or null when the zone is already promised to another holder

Parameters

holder

who is taking the space

zone

the zone to take, which must be on this guide path

duration

how long to hold it once the hold begins, strictly positive

action

told when the hold begins and when the clock gives it back