Ejemplo n.º 1
0
 private void scoreCompleted(Completable completable, boolean triggerBuilder) {
   CompletableScoreContext ctx = completable.getScoreContext();
   completable.walk(ctx);
   if (triggerBuilder && builderCap != null) {
     for (Meeple m : ctx.getSpecialMeeples()) {
       if (m instanceof Builder && m.getPlayer().equals(getActivePlayer())) {
         if (!m.at(getTile().getPosition())) {
           builderCap.useBuilder();
         }
         break;
       }
     }
   }
   if (ctx.isCompleted()) {
     Completable master = (Completable) ctx.getMasterFeature();
     if (!alredyScored.contains(master)) {
       alredyScored.add(master);
       game.scoreCompleted(ctx);
       game.scoreCompletableFeature(ctx);
       undeployMeeples(ctx);
       game.post(new FeatureCompletedEvent(getActivePlayer(), master, ctx));
     }
   }
 }
Ejemplo n.º 2
0
 @Override
 public void scoreCompleted(CompletableScoreContext ctx) {
   checkCastleVicinity(ctx.getPositions(), ctx.getPoints());
 }
Ejemplo n.º 3
0
 protected void undeployMeeples(CompletableScoreContext ctx) {
   for (Meeple m : ctx.getMeeples()) {
     m.undeploy(false);
   }
 }
Ejemplo n.º 4
0
 @Override
 public void scoreCompletableFeature(CompletableScoreContext ctx) {
   rank += rankUnfishedCompletable(ctx.getMasterFeature(), (LegacyAiScoreContext) ctx);
   rank += rankTrappedMeeples((LegacyAiScoreContext) ctx);
   rank += rankSpecialFigures((LegacyAiScoreContext) ctx);
 }