Package com.jcloisterzone.event

Examples of com.jcloisterzone.event.TowerIncreasedEvent


        String s1 = snapshotGame(game);
        Phase phase = game.getPhase();
        phase.placeTowerPiece(new Position(1, -2));
        //assertEquals(2, game.events.size()); //TowerIncreasedEvent, SelectActionEvent

        TowerIncreasedEvent ev = (TowerIncreasedEvent) game.events.get(0);
        ev.undo(game);
        game.setPhase(phase);

        String s2 = snapshotGame(game);
        assertEquals(s1, s2);
    }
View Full Code Here


            throw new IllegalArgumentException("The tower is sealed");
        }
        decreaseTowerPieces(player);
        tower.increaseHeight();
        lastIncreasedTower = pos;
        game.post(new TowerIncreasedEvent(player, pos, tower.getHeight()));
    }
View Full Code Here

            Position towerPos = XmlUtils.extractPosition(te);
            Tower tower = getBoard().get(towerPos).getTower();
            tower.setHeight(Integer.parseInt(te.getAttribute("height")));
            towers.add(towerPos);
            if (tower.getHeight() > 0) {
                game.post(new TowerIncreasedEvent(null, towerPos, tower.getHeight()));
            }
        }
        nl = node.getElementsByTagName("player");
        for (int i = 0; i < nl.getLength(); i++) {
            Element playerEl = (Element) nl.item(i);
View Full Code Here

TOP

Related Classes of com.jcloisterzone.event.TowerIncreasedEvent

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.