lib/catissue/helpers/location.rb
def succ!
      raise IndexError.new("Location #{qp} container not set") unless @container
      raise IndexError.new("Location #{qp} coordinate not set") unless @coordinate
      c = column.succ % @container.capacity.columns
      r = c.zero? ? row.succ : row
      unless r < container.capacity.rows then
        raise IndexError.new("Location #{[c, r].qp} exceeds #{@container} container capacity #{container.capacity.bounds}")
      end
      @coordinate.x = c
      @coordinate.y = r
      self
    end
def succ!
      raise IndexError.new("Location #{qp} container not set") unless @container
      raise IndexError.new("Location #{qp} coordinate not set") unless @coordinate
      c = column.succ % @container.capacity.columns
      r = c.zero? ? row.succ : row
      unless r < container.capacity.rows then
        raise IndexError.new("Location #{[c, r].qp} exceeds #{@container} container capacity #{container.capacity.bounds}")
      end
      @coordinate.x = c
      @coordinate.y = r
      self
    end
def succ! raise IndexError . new ( "Location #{qp} container not set" ) unless @container raise IndexError . new ( "Location #{qp} coordinate not set" ) unless @coordinate c = column . succ % @container . capacity . columns r = c . zero? ? row . succ : row unless r < container . capacity . rows then raise IndexError . new ( "Location #{[c, r].qp} exceeds #{@container} container capacity #{container.capacity.bounds}" ) end @coordinate . x = c @coordinate . y = r self end
Sets this Location to the next slot in this Location's {#container}.

 @raise [IndexError] if the next slot exceeds the container capacity
 @return self
Sets this Location to the next slot in this Location s { #container } .