[Home]PluggableRobot/Component

Robo Home | PluggableRobot | Changes | Preferences | AllPages

Showing revision 1
/*
 * PluggableRobot, by Robert J. Walker
 * Home page: http://robowiki.net/cgi-bin/robowiki?PluggableRobot
 * This software is made available under the RoboWiki Public Code License (RWPCL). The full text of
 * the license may be found at http://robowiki.net/cgi-bin/robowiki?RWPCL.
 */
package rjw.pluggablerobot;

/**
 * Components encapsulate the main combat behavior of the robot into pluggable modules. Any code
 * that actually sets an action for the robot (moving, turning, rotating the turret or radar, etc.)
 * should be done in the go() method. Components should NEVER call any blocking methods;
 * PluggableRobot will call execute() automatically when all components have had a chance to act.
 * @author Robert J. Walker
 */
public interface Component {
	/**
	 * Asks this Component to execute any actions that it wants to take this turn. PluggableRobot
	 * will call this method once per turn for each registered Component. Don't put any blocking
	 * calls in here; PluggableRobot will call execute() for you automatically after calling go() on
	 * each Component.
	 */
	public abstract void go();
}

Robo Home | PluggableRobot | Changes | Preferences | AllPages
Edit revision 1 of this page | View other revisions | View current revision
Edited September 22, 2007 4:18 EST by RobertWalker (diff)
Search: