lib/mazes/cartesian/mask.rb
# Public: Get a random valid address in the Mask.
#
# Returns an Array [x, y] whose values address a true-set mask entry.
Get a random valid address in the Mask.
Returns an Array [x, y] whose values address a true-set mask entry.
Get a random valid address in the Mask . Returns an Array [ x y ] whose values address a true - set mask entry .
def sample
			loop do
				x = rand @x
				y = rand @y
				return [x, y] if self[x, y]
			end
		end
def sample loop do x = rand @x y = rand @y return [ x , y ] if self [ x , y ] end end
Public: Get a random valid address in the Mask.
Public : Get a random valid address in the Mask .