jw5374 / KringleKonfidential

Kahoot but with a gift
1 stars 0 forks source link

Group member shuffling and matching #18

Closed jw5374 closed 2 years ago

jw5374 commented 2 years ago

Will most likely use Fisher-Yates algorithm (Durstenfeld improvement) Shuffling and matching logic should go as follows:

  1. There will be a set of member emails (possibly with associated semantic name)
  2. This set will then be duplicated, with everything in the same order
  3. Both sets will be shuffled with the mentioned method, maintain associated users (e.g. the index for a user in one set, would be the same in the duplicate set after shuffling)
  4. The duplicate set will have a single shift (e.g. all members are moved one index spot, could be up one or down one, where the first or last member will be shifted to the last or first place respectively)
  5. Emails can then be sent (e.g. send emails to the nonshifted set containing information held in the shifted set at the same index)