lib/mazes/distance_map.rb
# Public: Print a Cell's distance value when asked.
#
# cell - A Cell whose contents are being queried.
#
# Returns a single-character String.
#
# Calls the previous contents_of method if a distances value cannot be achieved.
# Internal: Get the contents of a Cell. Cells can dictate their own contents, or
# default to using a blank space.
Print a Cell's distance value when asked.
cell - A Cell whose contents are being queried.

Returns a single-character String.

Calls the previous contents_of method if a distances value cannot be achieved.
Internal: Get the contents of a Cell. Cells can dictate their own contents, or
default to using a blank space.
Print a Cell ' s distance value when asked . cell - A Cell whose contents are being queried . Returns a single - character String . Calls the previous contents_of method if a distances value cannot be achieved . Internal : Get the contents of a Cell . Cells can dictate their own contents or default to using a blank space .
def contents_of cell:
		if distances && distances[cell]
			distances[cell].to_s(36)[-1]
		else
			" "
		end
	end
def contents_of cell : if distances && distances [ cell ] distances [ cell ] . to_s ( 36 ) [ - 1 ] else " " end end
Public: Print a Cell's distance value when asked.
Public : Print a Cell ' s distance value when asked .
cell
<not_specific>