------art_260412_9936195.1153841378194
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

How about:
   @t.rounds  rray.new(4) { Round.new }
   @t.rounds.each_index do |i|
      @t.rounds[@t.rounds.length - 1 - i]  rray.new(1 << i) { Match.new }
   end
?

On 7/25/06, Michael Barinek <barinek / gmail.com> wrote:
>
> i'm looking to simplify the below...
>
> @tournament.rounds  rray.new(4) { Round.new }
>
> @tournament.rounds[0].matches  Array.new(8) { Match.new }
> @tournament.rounds[1].matches  Array.new(4) { Match.new }
> @tournament.rounds[2].matches  Array.new(2) { Match.new }
> @tournament.rounds[3].matches  Array.new(1) { Match.new }
>
> thoughts/suggestions?
>
> --
> Posted via http://www.ruby-forum.com/.
>
>

------art_260412_9936195.1153841378194--