diff --git a/app/services/tables/wheel_swap.rb b/app/services/tables/wheel_swap.rb index b5171a1..fea238b 100644 --- a/app/services/tables/wheel_swap.rb +++ b/app/services/tables/wheel_swap.rb @@ -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