dummey / CS50-Cohort-Project-Redux

2 stars 0 forks source link

Refactor `create_universe_boundary` to use a collection of boundary edges #10

Closed jbtule closed 9 years ago

jbtule commented 9 years ago
    left  = CP::Shape::Segment.new...
    right  = CP::Shape::Segment.new...
    etc...

put them into a hash ->

   boundaries = {
            left_edge: CP::Shape::Segment.new...
            right_edge: CP::Shape::Segment.new...
            etc...
   boundaries.each_value {|value| value.sensor = true }
   boundaries.each {|key, value| value.collision_type = key }