lib/crossyglot/puzzle.rb
# Internal word length calculation. Assumes the cell at x, y should be counted.
Internal word length calculation. Assumes the cell at x, y should be counted.
Internal word length calculation . Assumes the cell at x y should be counted .
def word_length(x, y, xstep, ystep)
      n = 0
      begin
        n += 1
        x, y = [x + xstep, y + ystep]
        cell = cell_at(x, y)
      end  until !cell || cell.black?
      n
    end
def word_length ( x , y , xstep , ystep ) n = 0 begin n += 1 x , y = [ x + xstep , y + ystep ] cell = cell_at ( x , y ) end until ! cell || cell . black? n end
Internal word length calculation.
Internal word length calculation .
x
y
xstep
ystep