Shuffle guests in WheelSwap before assigning them to new tables
This commit is contained in:
parent
a1f06dae5b
commit
b1df5d2f53
@ -11,9 +11,10 @@ module Tables
|
||||
|
||||
def call
|
||||
new_solution = @initial_solution.deep_dup
|
||||
|
||||
selected_guests = new_solution.tables.map(&:pop).cycle.tap(&:next)
|
||||
|
||||
selected_guests = new_solution.tables.map(&:pop).shuffle.cycle
|
||||
new_solution.tables.each { |table| table << selected_guests.next }
|
||||
new_solution.tables.each(&:reset)
|
||||
|
||||
new_solution
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user