package com.nurkiewicz.monkeys.actions;

import com.google.common.collect.ImmutableSet;
import com.nurkiewicz.monkeys.simulation.Population;
import com.nurkiewicz.monkeys.simulation.Statistics;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.time.Clock;
import java.time.Duration;
import java.util.Set;

public class Probe extends Action {

    private static final Logger log = LoggerFactory.getLogger(Probe.class);
    private final Population population;

    public Probe(Clock simulationTime, Duration delay, Population population) {
        super(simulationTime, delay);
        this.population = population;
    }

    @Override
    public void run() {
        final Statistics stats = population.statistics();
        log.info("At {} population: {}", getSchedule(), stats);
    }
}

@@ -49,42 +49,144 @@
 com.
-google.common.collect.ImmutableSet
+nurkiewicz.monkeys.behaviours.Cheater;%0Aimport com.nurkiewicz.monkeys.behaviours.Grudger;%0Aimport com.nurkiewicz.monkeys.behaviours.Sucker
 ;%0Aim
@@ -401,30 +401,8 @@
 ion;
-%0Aimport java.util.Set;
 %0A%0Apu
@@ -825,60 +825,367 @@
     
-log.info(%22At %7B%7D population: %7B%7D%22, getSchedule(), stat
+final Integer suckers = stats.getPerType().getOrDefault(Sucker.class.getSimpleName(), 0);%0A        final Integer grudgers = stats.getPerType().getOrDefault(Grudger.class.getSimpleName(), 0);%0A        final Integer cheaters = stats.getPerType().getOrDefault(Cheater.class.getSimpleName(), 0);%0A        System.out.println(cheaters + %22%5Ct%22 + grudgers + %22%5Ct%22 + sucker
 s);%0A

Print statistics easier to parse