Shuffle guests in WheelSwap before assigning them to new tables

This commit is contained in:
bustikiller 2025-07-23 11:01:38 +02:00
parent a1f06dae5b
commit b1df5d2f53

View File

@ -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