@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; }
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; }
/** * 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; }
@Override public Set<Position> getPositions() { return Collections.singleton(cloister.getTile().getPosition()); }