Ejemplo n.º 1
0
 @Override
 public boolean visit(Feature feature) {
   cloister = (Cloister) feature;
   Position pos = cloister.getTile().getPosition();
   List<Tile> neigbouringTiles = game.getBoard().getAdjacentAndDiagonalTiles(pos);
   neigbouringTilesCount = neigbouringTiles.size();
   if (lbCap != null) {
     collectLittleBuildings(cloister.getTile().getPosition());
     for (Tile tile : neigbouringTiles) {
       collectLittleBuildings(tile.getPosition());
     }
   }
   return true;
 }
Ejemplo n.º 2
0
 protected double getUnfinishedCloisterPoints(Cloister cloister, LegacyAiScoreContext ctx) {
   List<Meeple> followers = cloister.getMeeples();
   if (!followers.isEmpty() && isMe(followers.get(0).getPlayer())) {
     openCount[OPEN_COUNT_CLOITSTER]++;
   }
   double chanceToClose = ctx.getChanceToClose();
   int points = ctx.getPoints();
   return points + (9 - points) * chanceToClose;
 }
Ejemplo n.º 3
0
 /**
  * Method filter out abbots. They are not used for common scoring.
  *
  * @return
  */
 @Override
 public List<Follower> getFollowers() {
   List<Follower> follwers = new ArrayList<>();
   for (Meeple m : cloister.getMeeples()) {
     if (m.getLocation() != Location.ABBOT) {
       follwers.add((Follower) m);
     }
   }
   return follwers;
 }
Ejemplo n.º 4
0
 @Override
 public Set<Position> getPositions() {
   return Collections.singleton(cloister.getTile().getPosition());
 }