examples/rmagick_integration.rb
def hit_by? missile
    if Gosu.distance(missile.x, missile.y, x, y) < 30
      # Was hit :(
      @dead = true
      return true
    else
      return false
    end    
  end
# Magic numbers considered harmful! This is the height of the
# player as used for collision detection.
Magic numbers considered harmful. This is the height of the
player as used for collision detection.
Magic numbers considered harmful . This is the height of the player as used for collision detection .
def hit_by? missile
    if Gosu.distance(missile.x, missile.y, x, y) < 30
      @dead = true
      return true
    else
      return false
    end    
  end
def hit_by? missile if Gosu . distance ( missile . x , missile . y , x , y ) < 30 @dead = true return true else return false end end
Magic numbers considered harmful!
Magic numbers considered harmful!
# Was hit :(
missile