Package com.jcloisterzone.feature.visitor.score

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


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

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

    @Override
    public RoadScoreContext getScoreContext() {
        return new RoadScoreContext(getGame());
    }
View Full Code Here

TOP

Related Classes of com.jcloisterzone.feature.visitor.score.RoadScoreContext

Copyright © 2018 www.massapicom. 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.