examples/queens.rb
# return a blank board of a given size, as an array of N strings of length N
return a blank board of a given size, as an array of N strings of length N
return a blank board of a given size as an array of N strings of length N
def empty_board n
  (1..n).collect do |i|
    ((i+1).odd? ? O : E).take(n).join ""
  end
end
def empty_board n ( 1 .. n ) . collect do | i | ( ( i + 1 ) . odd? ? O : E ) . take ( n ) . join "" end end
return a blank board of a given size, as an array of N strings of length N
return a blank board of a given size as an array of N strings of length N
n
<not_specific>