protected double getUnfinishedCityPoints(City city, LegacyAiScoreContext ctx) { double chanceToClose = ctx.getChanceToClose(); if (chanceToClose > MIN_CHANCE && ctx.getMajorOwners().contains(getPlayer())) { openCount[OPEN_COUNT_CITY]++; } // legacy heuristic CityScoreContext cityCtx = (CityScoreContext) ctx.getCompletableScoreContext(); if (chanceToClose < MIN_CHANCE) { return cityCtx.getPoints(false) + 3.0 * chanceToClose; } else { return cityCtx.getPoints(true) - 3.0 * (1.0 - chanceToClose); } }
protected double getUnfinishedRoadPoints(Road road, LegacyAiScoreContext ctx) { double chanceToClose = ctx.getChanceToClose(); ; if (chanceToClose > MIN_CHANCE && ctx.getMajorOwners().contains(getPlayer())) { openCount[OPEN_COUNT_ROAD]++; } // legacy heuristic RoadScoreContext roadCtx = (RoadScoreContext) ctx.getCompletableScoreContext(); if (chanceToClose < MIN_CHANCE) { return roadCtx.getPoints(false) + 3.0 * chanceToClose; } else { return roadCtx.getPoints(true) - 3.0 * (1.0 - chanceToClose); } }