Examples of SetTileVegetationCommand


Examples of org.freerealm.executor.command.SetTileVegetationCommand

    public void execute(Realm realm) {
        Vegetation vegetation = realm.getTile(getUnit().getCoordinate()).getVegetation();
        if (vegetation != null) {
            int turnsSpent = realm.getNumberOfTurns() - getTurnGiven();
            if (turnsSpent >= vegetation.getTurnsNeededToClear()) {
                SetTileVegetationCommand setTileVegetationCommand = new SetTileVegetationCommand(getUnit().getCoordinate(), null);
                Executor.getInstance().execute(setTileVegetationCommand);
                setComplete(true);
            } else {
                getUnit().setMovementPoints(0);
            }
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.