}
@Override
public void handle(Input input)
{
final HuntResult in = (HuntResult)input;
dm.foodAquired(in.getFoodReceived());
logger.log(Level.FINE, "I, agent {0}, recieved {1} units of food",
new Object[]
{
dm.getName(),
in.getFoodReceived()
});
dm.setCurrentHappiness(updateHappinessAfterHunt(in.getFoodHunted(),
in.getFoodReceived()));
dm.setCurrentLoyalty(updateLoyaltyAfterHunt(in.getFoodHunted(),
in.getFoodReceived()));
Map<String, Double> t = updateTrustAfterHunt(in.getFoodHunted(),
in.getFoodReceived());
if (t == null) return;
for (String agent : t.keySet())
{
dm.setTrust(agent, t.get(agent));
}