lib/mazes/space.rb
# Public: Get all the Cells which are deadends.
#
# Returns an Array of Cells, all of which have only one neighbor.
# Raises a not-implemented exception when used on Spaces that have yet to
# implement an iterator.
Get all the Cells which are deadends.
Returns an Array of Cells, all of which have only one neighbor.
Raises a not-implemented exception when used on Spaces that have yet to
implement an iterator.
Get all the Cells which are deadends . Returns an Array of Cells all of which have only one neighbor . Raises a not - implemented exception when used on Spaces that have yet to implement an iterator .
def deadends
			ret = []
			each_cell do |cell|
				ret << cell if cell.links.count == 1
			end
			ret
		end
def deadends ret = [ ] each_cell do | cell | ret << cell if cell . links . count == 1 end ret end
Public: Get all the Cells which are deadends.
Public : Get all the Cells which are deadends .