lib/rrschedule.rb in rrschedule-0.2.1 vs lib/rrschedule.rb in rrschedule-0.2.2

- old
+ new

@@ -142,10 +142,10 @@ while !rounds_copy.flatten.empty? do cur_round = rounds_copy[cur_flight_index].shift #process the next round in the current flight if cur_round - cur_round.games.each do |game| + cur_round.games.shuffle.each do |game| unless [game.team_a,game.team_b].include?(:dummy) if teams_day[flat_schedule[i][:gamedate]] && (teams_day[flat_schedule[i][:gamedate]].include?(game.team_a) || teams_day[flat_schedule[i][:gamedate]].include?(game.team_b)) #team is already playing this day. This can happen if we have flights with different number of teams in it. gamedate = flat_schedule[i][:gamedate] while flat_schedule[i] && flat_schedule[i][:gamedate] == gamedate do