Sha256: 6cdd78ba4092b0c06bfe4529c6971a6acc848d298c0db04c0b2853d58a25acce

Contents?: true

Size: 232 Bytes

Versions: 6

Compression:

Stored size: 232 Bytes

Contents

Vect = Struct.new(:x, :y)

class BubbleFactory
  attr_reader :xrange
  def initialize(xrange:)
    @xrange = xrange
  end
  
  def create_bubble(hue:, height:)
    Bubble.new(pos: Vect.new(rand(xrange), height), hue: hue)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pbox2d-1.0.3-java examples/blob/lib/bubble_factory.rb
pbox2d-1.0.2-java examples/blob/lib/bubble_factory.rb
pbox2d-1.0.1-java examples/blob/lib/bubble_factory.rb
pbox2d-1.0.0-java examples/blob/lib/bubble_factory.rb
pbox2d-0.9.1-java examples/blob/lib/bubble_factory.rb
pbox2d-0.9.0-java examples/blob/lib/bubble_factory.rb