示例#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));
     }
   }
 }
 @Override
 public void scoreCompleted(CompletableScoreContext ctx) {
   checkCastleVicinity(ctx.getPositions(), ctx.getPoints());
 }
示例#3
0
 protected void undeployMeeples(CompletableScoreContext ctx) {
   for (Meeple m : ctx.getMeeples()) {
     m.undeploy(false);
   }
 }
 @Override
 public void scoreCompletableFeature(CompletableScoreContext ctx) {
   rank += rankUnfishedCompletable(ctx.getMasterFeature(), (LegacyAiScoreContext) ctx);
   rank += rankTrappedMeeples((LegacyAiScoreContext) ctx);
   rank += rankSpecialFigures((LegacyAiScoreContext) ctx);
 }