Examples of NeutralFigureMoveEvent


Examples of com.jcloisterzone.event.NeutralFigureMoveEvent

    public void loadFromSnapshot(Document doc, Element node) {
        NodeList nl = node.getElementsByTagName("fairy");
        if (nl.getLength() > 0) {
            Element fairy = (Element) nl.item(0);
            fairyPosition = XmlUtils.extractPosition(fairy);
            game.post(new NeutralFigureMoveEvent(NeutralFigureMoveEvent.FAIRY, null, null, fairyPosition));
        }
    }
View Full Code Here

Examples of com.jcloisterzone.event.NeutralFigureMoveEvent

        }

        FairyCapability cap = game.getCapability(FairyCapability.class);
        Position fromPosition = cap.getFairyPosition();
        cap.setFairyPosition(p);
        game.post(new NeutralFigureMoveEvent(NeutralFigureMoveEvent.FAIRY, getActivePlayer(), fromPosition, p));
        next();
    }
View Full Code Here

Examples of com.jcloisterzone.event.NeutralFigureMoveEvent

        for (Meeple m : game.getDeployedMeeples()) {
            if (m.at(p) && m.canBeEatenByDragon()) {
                m.undeploy();
            }
        }
        game.post(new NeutralFigureMoveEvent(NeutralFigureMoveEvent.DRAGON, player, fromPosition, p));
        selectDragonMove();
    }
View Full Code Here

Examples of com.jcloisterzone.event.NeutralFigureMoveEvent

        Tile tile = ev.getTile();
        if (ev.getType() == TileEvent.PLACEMENT && tile.hasTrigger(TileTrigger.VOLCANO)) {
            Position fromPosition = dragonPosition;
            dragonPosition = tile.getPosition();
            getTilePack().setGroupState("dragon", TileGroupState.ACTIVE);
            game.post(new NeutralFigureMoveEvent(NeutralFigureMoveEvent.DRAGON, null, fromPosition, dragonPosition));
        }
    }
View Full Code Here

Examples of com.jcloisterzone.event.NeutralFigureMoveEvent

    public void loadFromSnapshot(Document doc, Element node) {
        NodeList nl = node.getElementsByTagName("dragon");
        if (nl.getLength() > 0) {
            Element dragon = (Element) nl.item(0);
            dragonPosition = XmlUtils.extractPosition(dragon);
            game.post(new NeutralFigureMoveEvent(NeutralFigureMoveEvent.DRAGON, null, null, dragonPosition));
            if (dragon.hasAttribute("moves")) {
                dragonMovesLeft  = Integer.parseInt(dragon.getAttribute("moves"));
                dragonPlayer = game.getPlayer(Integer.parseInt(dragon.getAttribute("movingPlayer")));
                dragonVisitedTiles = new HashSet<>();
                NodeList vl = dragon.getElementsByTagName("visited");
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.