lib/mazes/mask.rb
# Internal: Select a mask at random from the collection.
#
# Returns a dims array of a randomly chosen true-mask.
# Raises a not-implemented exception.
Select a mask at random from the collection.
Returns a dims array of a randomly chosen true-mask.
Raises a not-implemented exception.
Select a mask at random from the collection . Returns a dims array of a randomly chosen true - mask . Raises a not - implemented exception .
def sample
			ret = []
			@dims.each do |d|
				ret << rand(d)
			end
			raise "#{self.class} has not implemented a random sampler"
			ret
		end
def sample ret = [ ] @dims . each do | d | ret << rand ( d ) end raise "#{self.class} has not implemented a random sampler" ret end
Internal: Select a mask at random from the collection.
Internal : Select a mask at random from the collection .