public void herbivoreAnimalFeeder() {
        int eatnum = gen.nextInt(100);
        herbanimeat++; // Increments the animal eat variable each time the method is called.
        for (HerbivoreAnimal ha : herbanimalArray) { // For each animal in the array
            ha.decHunger(); // call that animals decHunger method which decrements their hunger variable.
            if (!plantArray.isEmpty()) {
                randnum = gen.nextInt(plantArray.size());
                if (ha.isHungry()) {
                    if (!ha.isDead()) {
                        if (ha.getHunger() <= 0) {
                            ha.setDead(true);
                        } else {
                            ha.Eat(plantArray.get(randnum));
                            ConsoleLogger.Log("Herbivore Animal " + ha.getName() + " has eaten " + plantArray.get(randnum).getName(), 1);
                        }
                    }
                } else if (eatnum == herbanimeat | herbanimeat == 100) {
                    if (ha.isHungry()) {
                        if (!ha.isDead()) {
                            if (ha.getHunger() <= 0) {
                                ha.setDead(true);
                            } else {
                                ha.Eat(plantArray.get(randnum));
                                ConsoleLogger.Log("Herbivore Animal " + ha.getName() + " has eaten " + plantArray.get(randnum).getName(), 1);
                            }
                        }
                    }
                }
            }
        }
    }