Deuteronomy 20
19 Ref If in war a town is shut in by your armies for a long time, do not let its trees be cut down and made waste; for their fruit will be your food; are the trees of the countryside men for you to take up arms against them?
20 Ref Only those trees which you are certain are not used for food may be cut down and put to destruction: and you are to make walls of attack against the town till it is taken.