public void scoreAll(Game game, ScoreAllCallback callback) {
//first score non-farm features to fill city cache
for (Meeple m : game.getDeployedMeeples()) {
if (!(m instanceof Follower)) continue;
Feature f = m.getFeature();
if (f instanceof Castle) {
callback.scoreCastle(m, (Castle) f);
continue;
}
if (f instanceof Completable) {
if (alreadyRated.contains(m)) continue;
scoreCompletable((Completable) f, callback);
if (f instanceof Cloister && ((Cloister)f).isMonastery()) {
//additionally to common monk scoring count score for abbots
MonasteryAbbotScoreContext ctx = new MonasteryAbbotScoreContext(game);
ctx.visit(f);
callback.scoreCompletableFeature(ctx);
}
}
}
for (Meeple m : game.getDeployedMeeples()) {
if (!(m instanceof Follower) && !(m instanceof Barn)) continue;
Feature f = m.getFeature();
if (f instanceof Farm) {
if (alreadyRated.contains(m)) continue;
scoreFarm((Farm) f, callback);
}