Examples of CityScoreContext


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

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

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

public class CityScoring extends AbstractScoringTest {

    protected void assertScore(int expected, Tile tile, Location loc) {
        City city = (City) tile.getFeaturePartOf(loc);
        CityScoreContext ctx = city.getScoreContext();
        city.walk(ctx);

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

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

        this.castleBase = castleBase;
    }

    @Override
    public CityScoreContext getScoreContext() {
        return new CityScoreContext(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.