A shuffle-bag over positions 1 to n: every position is dealt exactly once per lap, and the bag reshuffles between laps -- draws without repeats until the pool is spent, then a fresh lap. A lap's last deal may equal the next lap's first.
The next position of the current lap, starting a fresh shuffled lap when the last one is spent.
Example
-- Positions 1 to 3, each once per lap.print(bag:draw(), bag:draw(), bag:draw()) --> 2 3 1print(bag:left()) --> 0-- The next draw starts a fresh shuffled lap.print(bag:draw()) --> 3print(bag:left()) --> 2
Bag:left
method
Bag:left() -> integer
How many positions the current lap still holds; 0 means the next draw starts a fresh lap.