lib/mazes/distances.rb
# Public: Find the farthest Cell from the root Cell in a given Space.
#
# Returns a tuple (Array) containing the farthest Cell and its Integer distance.
Find the farthest Cell from the root Cell in a given Space.
Returns a tuple (Array) containing the farthest Cell and its Integer distance.
Find the farthest Cell from the root Cell in a given Space . Returns a tuple ( Array ) containing the farthest Cell and its Integer distance .
def farthest
			max_cell, max_dist = @root, 0
			@cells.each do |cell, dist|
				if dist > max_dist
					max_cell, max_dist = cell, dist
				end
			end
			[max_cell, max_dist]
		end
def farthest max_cell , max_dist = @root , 0 @cells . each do | cell , dist | if dist > max_dist max_cell , max_dist = cell , dist end end [ max_cell , max_dist ] end
Public: Find the farthest Cell from the root Cell in a given Space.
Public : Find the farthest Cell from the root Cell in a given Space .