/* CVS: $Id: SimpleAction.java,v 1.4 2001/03/18 19:16:33 gvijf Exp $ */ package evolution.actions; import evolution.*; import evolution.resources.*; import evolution.lands.*; /** * SimpleAction represents all actions for which no extra code * should be written to define the behaviour. */ public class SimpleAction extends Action { /** * Constructor of a simple action. */ public SimpleAction(String actionName) { setName(actionName); } /** * Set the name of this simple action. */ protected void setName(String actionName) { this.actionName = actionName; } /** * Return the name of this simple action. */ public String getName() { return actionName; } /** * Extra things which should be done when this action's perform * method is called. * Template method. */ protected void _perform(Human human) throws NotEnoughResourcesException, IllegalLandTypeException, NotEnoughLandResourcesException { } /** * The name of this simple action. */ private String actionName; }