Skip to main content

first_free_slot

Function first_free_slot 

Source
pub(crate) fn first_free_slot(occupied: &HashSet<PinSlot>) -> PinSlot
Expand description

The first slot the owner’s pins leave free, scanning top-down and West before East. Total: each offset offers two slots, so some slot at an offset in 0..=n escapes n occupants.

Shared with the clipboard: a paste slots its pins by the same policy a stamp does, group at a time.