Package com.jcloisterzone.feature

Examples of com.jcloisterzone.feature.Completable


        Tile tile1 = game.getCurrentTile();
        Tile tile2 = game.getBoard().get(f2Pos);

        double rating = 0;

        Completable f1 = (Completable) tile1.getFeaturePartOf(toEmpty);
        Completable f2 = (Completable) tile2.getFeaturePartOf(toFeature.rev());

        if (f1 != null && f2 != null) {
            if (f1.getClass().equals(f2.getClass())) {
                //            System.err.println("    " + tile1.getPosition() + " <-->" + f2Pos + " / " + f1 + " " + f2);
                rating +=  futureConnectionRateFeatures(game, toEmpty, toFeature, chance, f1, f2);
            } else {
                rating +=  futureConnectionRateCrossing(game, toEmpty, toFeature, chance, f1, f2);
            }
View Full Code Here


 
  private boolean isCompleted = true;
 
  @Override
  public boolean visit(Feature feature) {   
    Completable completable = (Completable) feature;
    if (completable.isOpen()) {
      isCompleted = false;
    }   
    return super.visit(feature);
  }
View Full Code Here

    private boolean isCompleted = true;

    @Override
    public boolean visit(Feature feature) {
        Completable completable = (Completable) feature;
        if (completable.isOpen()) {
            isCompleted = false;
        }
        super.visit(feature);
        return true;
    }
View Full Code Here

    private boolean isCompleted = true;

    @Override
    public boolean visit(Feature feature) {
        Completable completable = (Completable) feature;
        if (completable.isOpen()) {
            isCompleted = false;
            return false;
        }
        return true;
    }
View Full Code Here

                    break;
                }
            }
        }
        if (ctx.isCompleted()) {
            Completable master = (Completable) ctx.getMasterFeature();
            if (!alredyScored.contains(master)) {
                alredyScored.add(master);
                game.scoreCompleted(ctx);
                game.scoreCompletableFeature(ctx);
                undeployMeeples(ctx);
View Full Code Here

       }

    }

    private void completed(FeatureCompletedEvent ev) {
        Completable feature = ev.getFeature();
        CompletableScoreContext ctx = ev.getScoreContent();
        if (feature instanceof City) {
            cityCompleted((City) feature, (PositionCollectingScoreContext) ctx);
        }
        if (feature instanceof Road) {
View Full Code Here

TOP

Related Classes of com.jcloisterzone.feature.Completable

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.