Langton's ant: Difference between revisions

(remove draft tag (can I do that?). Looks a normal task to me, no issues on talk page. Corrected a typo.)
Line 609:
 
def to_s
@cells.inject("") docollect {|output, row|
column = row.inject("")collect {|col, cell| col + (cell.white? ? "." : "#")}.join + "\n"
}.join
output += column + "\n"
end
end
end
Anonymous user