This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def how_to_make_pizza( components, pizza_size ) | |
components.each do |component| | |
angle = rand * 2 * Math::PI | |
dist = rand(pizza_size) / 2.0 | |
Fan << component.move_to( Position.new( dist * Math.cos( angle ), dist * Math.sin ( angle )).release | |
end | |
end |