private double rankTrappedMeeples(LegacyAiScoreContext ctx) { // musi tu byt dolni mez - btw nestaci toto misto hodnoceni figurek, spis asi :) // TODO lepe if (myTurnsLeft < 8) return 0.0; if (ctx.getChanceToClose() > 0.4) return 0.0; double rating = 0.0; for (Meeple m : ctx.getMeeples()) { if (isMe(m.getPlayer())) { rating += TRAPPED_MY_FIGURE_POINTS; } else { rating += TRAPPED_ENEMY_FIGURE_POINTS; } } return (1.0 - ctx.getChanceToClose()) * rating; // no reduce }