Package org.freerealm.player

Examples of org.freerealm.player.ResourceWastedMessage


            Resource resource = (Resource) resourceIterator.next();
            int storage = settlement.getTotalCapacity(resource);
            if (settlement.getResourceQuantity(resource) > storage) {
                int wastedAmount = settlement.getResourceQuantity(resource) - storage;
                StringBuffer messageText = new StringBuffer(wastedAmount + " units of " + resource + " is wasted in " + settlement.getName());
                ResourceWastedMessage message = new ResourceWastedMessage();
                message.setText(messageText);
                message.setTurnSent(realm.getNumberOfTurns());
                message.setSettlement(settlement);
                message.setResource(resource);
                player.addMessage(message);
                settlement.setResourceQuantity(resource, storage);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.freerealm.player.ResourceWastedMessage

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.