def add_object(o)
      if !@objects.include?(o)
        index = @objects.index do |object|
          object.z > o.z
        end
        if index
          @objects.insert(index, o)
        else
          @objects.push(o)
        end
        true
      else
        false
      end
    end
def add_object(o)
      if !@objects.include?(o)
        index = @objects.index do |object|
          object.z > o.z
        end
        if index
          @objects.insert(index, o)
        else
          @objects.push(o)
        end
        true
      else
        false
      end
    end
An an object to the window, used by the public `add` method