public void updateTrees(double dT){
        for(int i = 0; i < trees.size(); i++){
            trees.get(i).getCell().adjustSaturation(-0.005f); // Trees absorb some of the water in the ground just by existing
            int closeNeighborsCount = 0;
            for(int j = 0; j < trees.size(); j++){
                if(i != j){
                    if(Utilities.cellDistance(trees.get(i).getCell(), trees.get(j).getCell()) < 3){
                        closeNeighborsCount++;
                    }
                }
            }
            // If the tree is surrounded, it will die from overpopulation
            if(closeNeighborsCount > 5){
                trees.get(i).setMarkedForDeath(true);
            }else if(closeNeighborsCount < 2){ // If the tree has few neighbors, it's seeds can travel, so a new tree will be created
                Random numGen = new Random();
                int xOffset = numGen.nextInt(6) - 3;
                int yOffset = numGen.nextInt(6) - 3;
                Cell newTreeCell = heightmap.getCells()[trees.get(i).getCell().getX() + xOffset][trees.get(i).getCell().getY() + yOffset];
                Tree newTree = new Tree(newTreeCell, 100.0f);
                trees.add(newTree);
                newTreeCell.setHasTree(true);
                newTreeCell.setTree(newTree);
            }
        }

        // Process the trees which must be killed off
        for(int i = 0; i < trees.size(); i++){
            // Get the cell of this tree
            Cell currentCell = heightmap.getCells()[trees.get(i).getCell().getX()][trees.get(i).getCell().getY()];
            // Apply time interval to each tree
            trees.get(i).addTime((float)dT);
            // If the tree is set to die, get rid of it
            if(trees.get(i).isMarkedForDeath()){
                trees.remove(i);
                currentCell.setHasTree(false);
                // Perhaps unnecessary, I'm hoping by setting the tree to null the GC will collect it
                currentCell.setTree(null);
            }
        }
    }