Function veloren_common::lottery::distribute_many

source ยท
pub fn distribute_many<T: Copy + Eq + Hash, I>(
    participants: impl IntoIterator<Item = (f32, T)>,
    rng: &mut impl Rng,
    items: &[I],
    get_amount: impl FnMut(&I) -> u32,
    exec_item: impl FnMut(&I, T, u32),
)
Expand description

Try to distribute stacked items fairly between weighted participants.