On 9/3/07, Joop Van den tillaart <tillaart36 / hotmail.com> wrote: > Hi guys, > > can someone please lend me a hand in this. I have a piece of code that > generates a grid like structure. All the cells in this grid now have 2 > properties namely a celltype and a cell distance (to cells with type 1). > > For now the code can only define celltypes to rows and columns. I need > to add a piece of code that will let me define celltypes to individual > cells. Does anyone know how I can achieve this and what pieces of code I > need to add? > > I could really use a hand of someone more experienced in Ruby as I am. > Thanks in advance! > > Greets tillaart36... > > Attachments: > http://www.ruby-forum.com/attachment/218/testgrid3.rb With your current code... grid[1,1].type = 3 grid[1,1].distance_road = 5 Todd