rc.yoda.plugin
Class MovementArray

java.lang.Object
  extended by rc.yoda.plugin.MovementArray
All Implemented Interfaces:
Plugin

public class MovementArray
extends java.lang.Object
implements Plugin

MovementArray is class that load and manages all Movement classes and determines which Movement is the best to use a what time. Acts as a dynamic MutiMode manger for a robots movements

Version:
v1.1
Author:
Robert Codd

Constructor Summary
MovementArray(robocode.AdvancedRobot robot)
          Class Constructor specifing the AdvancedRobot this MovementArray is working for
 
Method Summary
 void onBulletHit(robocode.BulletHitEvent e)
          Event method called by Robocode when a bullet this robot fired hits another robot
 void onBulletHitBullet(robocode.BulletHitBulletEvent e)
          Event method called by Robocode when a bullet this robot fired collides with a bullet fired by another robot
 void onBulletMissed(robocode.BulletMissedEvent e)
          Event method called by Robocode when a bullet this robot fired hit a wall
 void onDeath(robocode.DeathEvent e)
          Event method called by Robocode when this robot dies
 void onHitByBullet(robocode.HitByBulletEvent e)
          Event method called by Robocode when this robot gets hit by a bullet
 void onHitRobot(robocode.HitRobotEvent e)
          Event method called by Robocode when this robot collides with another robot
 void onHitWall(robocode.HitWallEvent e)
          Event method called by Robocode when this robot hits a wall
 void onPaint(java.awt.Graphics2D g)
          Event method called by Robocode when this robot is allowed to draw debugging graphics to the screen
 void onRobotDeath(robocode.RobotDeathEvent e)
          Event method called by Robocode when a robot dies
 void onRobotFire(double deltaEnergy)
          Event method called by this robot when it detects that the enemy fired a bullet
 void onScannedRobot(robocode.ScannedRobotEvent e)
          Event method called by Robocode when this robot's scanner passes over another robot
 void onWin(robocode.WinEvent e)
          Event method called by Robocode when this robot wins a round
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MovementArray

public MovementArray(robocode.AdvancedRobot robot)
Class Constructor specifing the AdvancedRobot this MovementArray is working for

Method Detail

onRobotFire

public void onRobotFire(double deltaEnergy)
Event method called by this robot when it detects that the enemy fired a bullet

Specified by:
onRobotFire in interface Plugin
Parameters:
double - deltaEnergy the power of the bullet fired

onScannedRobot

public void onScannedRobot(robocode.ScannedRobotEvent e)
Event method called by Robocode when this robot's scanner passes over another robot

Specified by:
onScannedRobot in interface Plugin
Parameters:
ScannedRobotEvent - information about the scanned robot

onHitByBullet

public void onHitByBullet(robocode.HitByBulletEvent e)
Event method called by Robocode when this robot gets hit by a bullet

Specified by:
onHitByBullet in interface Plugin
Parameters:
HitByBulletEvent - information about ther bullet that hit this robot

onBulletHit

public void onBulletHit(robocode.BulletHitEvent e)
Event method called by Robocode when a bullet this robot fired hits another robot

Specified by:
onBulletHit in interface Plugin
Parameters:
BulletHitEvent - information about the robot that got hit by the bullet

onBulletMissed

public void onBulletMissed(robocode.BulletMissedEvent e)
Event method called by Robocode when a bullet this robot fired hit a wall

Specified by:
onBulletMissed in interface Plugin
Parameters:
BulletMissedEvent - information about the bullet

onBulletHitBullet

public void onBulletHitBullet(robocode.BulletHitBulletEvent e)
Event method called by Robocode when a bullet this robot fired collides with a bullet fired by another robot

Specified by:
onBulletHitBullet in interface Plugin
Parameters:
BulletHitBulletEvent - information about the bullets

onHitWall

public void onHitWall(robocode.HitWallEvent e)
Event method called by Robocode when this robot hits a wall

Specified by:
onHitWall in interface Plugin
Parameters:
HitWallEvent - information about the wall

onHitRobot

public void onHitRobot(robocode.HitRobotEvent e)
Event method called by Robocode when this robot collides with another robot

Specified by:
onHitRobot in interface Plugin
Parameters:
HitRobotEvent - information about the collision and the other robot in the crash

onRobotDeath

public void onRobotDeath(robocode.RobotDeathEvent e)
Event method called by Robocode when a robot dies

Specified by:
onRobotDeath in interface Plugin
Parameters:
RobotDeathEvent - name of decaesed robot

onWin

public void onWin(robocode.WinEvent e)
Event method called by Robocode when this robot wins a round

Specified by:
onWin in interface Plugin
Parameters:
WinEvent -

onDeath

public void onDeath(robocode.DeathEvent e)
Event method called by Robocode when this robot dies

Specified by:
onDeath in interface Plugin
Parameters:
DeathEvent -

onPaint

public void onPaint(java.awt.Graphics2D g)
Event method called by Robocode when this robot is allowed to draw debugging graphics to the screen

Specified by:
onPaint in interface Plugin
Parameters:
Graphics2D - graphics that provides drawing method for painting