Examples of RoadScoreContext


Examples of com.jcloisterzone.feature.visitor.score.RoadScoreContext

        if (chanceToClose > MIN_CHANCE && ctx.getMajorOwners().contains(aiPlayer.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);
        }

    }
View Full Code Here

Examples of com.jcloisterzone.feature.visitor.score.RoadScoreContext

public class RoadScoring extends AbstractScoringTest {

    protected void assertScore(int expected, Tile tile, Location loc) {
        Road road = (Road) tile.getFeaturePartOf(Location.W);
        RoadScoreContext ctx = road.getScoreContext();
        road.walk(ctx);

        assertEquals(expected, ctx.getPoints());
    }
View Full Code Here

Examples of com.jcloisterzone.feature.visitor.score.RoadScoreContext

        edges[edges.length - 1] = f;
    }

    @Override
    public RoadScoreContext getScoreContext() {
        return new RoadScoreContext(getGame());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.