def view
buf = String.new # A buffer to hold the string.
# Iterates through the 2 dimensional array "map" and dumps the "view"
# of each sector, in order, into the buffer.
last_color = @map[0][0].view[0..1]
15.times do |y|
buf << "\r\n" if y > 0
15.times do |x|
if @map[x][y].view[0..1] == last_color
buf << @map[x][y].view[2]
else
last_color = @map[x][y].view[0..1]
buf << @map[x][y].view
end
end
end