From: Joop Van den tillaart Date: 2007-09-06T20:44:59+09:00 Subject: Re: Filling individual cells in a grid Joop Van den tillaart wrote: > Wow, thanks for your help... > > Im trying it out right now... Hey all you guys... me and someone of my university have set up a new way of generating the grid. For now it generates a grid of 20x20 with 2 columns and 1 row filled with celltype 1. The other cells are set to value 0. I want the remaining cells with value 0 to be divided in say 60% type 2 and the remaining 40% (of the remaining 0 cells) to be valued as type 3. Does anyone know how to do this in a neat way (from a programmers point of view) and if so can anyone share some techniques with me? See the attachment for the new generating of the grid. Thanks in advance! Attachments: http://www.ruby-forum.com/attachment/233/testje.rb -- Posted via http://www.ruby-forum.com/.