[Home]PluggableRobot/EventListener

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;

import robocode.*;

/**
 * Event listener interfaces. Objects that wish to be notified of events must extend one of these
 * subinterfaces.
 * @author Robert J. Walker
 */
public interface EventListener {
	public interface BulletHitBullet extends EventListener {
		/**
		 * Called by PluggableRobot when a bullet fired by your robot has hit another bullet.
		 */
		public void notifyBulletHitBullet(BulletHitBulletEvent event);
	}

	public interface BulletHit extends EventListener {
		/**
		 * Called by PluggableRobot when a bullet fired by your robot has hit another robot.
		 */
		public void notifyBulletHit(BulletHitEvent event);
	}

	public interface BulletMissed extends EventListener {
		/**
		 * Called by PluggableRobot when a bullet fired by your robot has hit a wall.
		 */
		public void notifyBulletMissed(BulletMissedEvent event);
	}

	public interface Death extends EventListener {
		/**
		 * Called by PluggableRobot when your robot has been destroyed.
		 */
		public void notifyDeath(DeathEvent event);
	}

	public interface HitByBullet extends EventListener {
		/**
		 * Called by PluggableRobot when your robot has been hit by an enemy bullet.
		 */
		public void notifyHitByBullet(HitByBulletEvent event);
	}

	public interface HitRobot extends EventListener {
		/**
		 * Called by PluggableRobot when your robot has collided with another robot.
		 */
		public void notifyHitRobot(HitRobotEvent event);
	}

	public interface HitWall extends EventListener {
		/**
		 * Called by PluggableRobot when your robot has collided with a wall.
		 */
		public void notifyHitWall(HitWallEvent event);
	}

	public interface RobotDeath extends EventListener {
		/**
		 * Called by PluggableRobot when an enemy robot has been destroyed.
		 */
		public void notifyRobotDeath(RobotDeathEvent event);
	}

	public interface ScannedRobot extends EventListener {
		/**
		 * Called by PluggableRobot when your radar has swept over an enemy robot.
		 */
		public void notifyScannedRobot(ScannedRobotEvent event);
	}

	public interface SkippedTurn extends EventListener {
		/**
		 * Called by PluggableRobot when your robot skipped a turn.
		 */
		public void notifySkippedTurn(SkippedTurnEvent event);
	}

	public interface Win extends EventListener {
		/**
		 * Called by PluggableRobot when all robots besides yours have been destroyed.
		 */
		public void notifyWin(WinEvent event);
	}
}

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