From: andrea Date: 2009-01-08T21:29:51+09:00 Subject: Re: tictactoe and choice On 8 Gen, 10:09, Jesús Gabriel y Galán wrote: > # board = [] > # (0...(len)).each { board << [nil] * len } > > board = Array.new(len) {[nil]*len} > > free = [] > # setting all the free cells > # for i in (0...(len)) > #    for j in (0...(len)) > #      free << [i, j] > #    end > #  end > > # Not in a single loop but I'd do: > 0.upto(len-1) {|i| 0.upto(len-1) {|j| free << [i,j]}} > > >  [board, free] > > end > > Jesus. Thanks a lot, with classes is much much better and cleaner http://pastie.textmate.org/private/hompwzt9vu5oz7dkwryrg Now I have to implement the decision engine and that's it, I could be satisfied. I wanted to try to use callcc for the decision tree (along with a normal backtrack stack), could it be a good idea?