function drop_present(chicken_number)
  table.insert(presentx,chickenx[chicken_number] + 20)
  table.insert(presenty,chickeny[chicken_number] + 40)
end

function remove_presents()
  presents_to_be_removed = sort(presents_to_be_removed)
  if table.getn(presents_to_be_removed) > 0 then
    for i = 1,table.getn(presents_to_be_removed) do
      table.remove(presentx,presents_to_be_removed[i]) 
      table.remove(presenty,presents_to_be_removed[i]) 
    end
  end
  presents_to_be_removed = {}
end

function move_presents()
  if table.getn(presentx) > 0 then
    for i = 1,table.getn(presentx) do
      presenty[i] = presenty[i] + 2
      if presenty[i] > 272 then table.insert(presents_to_be_removed,i) end
    end
  end
  remove_presents()
end
