rc.yoda.utils
Class Movement

java.lang.Object
  extended by rc.yoda.utils.Movement
Direct Known Subclasses:
Surfer

public class Movement
extends java.lang.Object

Movement - A class that defines the events a robocode movement can use

Version:
v 1.1
Author:
Robert Codd

Constructor Summary
Movement(robocode.AdvancedRobot robot)
           
 
Method Summary
 void onBulletHitBullet(robocode.BulletHitBulletEvent e)
          onBulletHitBullet - called by robocode when one of our bullets hits an enemy bullet
 void onDeath(robocode.DeathEvent e)
          onDeath - called by robocode when our robot dies
 void onHitByBullet(robocode.HitByBulletEvent e)
          onHitByBullet - called by robocode when our robot gets hit by a bullet
 void onHitRobot(robocode.HitRobotEvent e)
          onHitRobot - called by robocode when our robot hits another robot
 void onHitWall(robocode.HitWallEvent e)
          onHitWall - called by robocode when our robot hits a wall
 void onPaint(java.awt.Graphics2D g)
          onPaint - called by robocode when our robot can draw to the screen
 void onRobotFire(double deltaEnergy)
          onRobotFire - called by the robot when the enemy fires a bullet
 void onScannedRobot(robocode.ScannedRobotEvent e)
          onScannedRobot - called by robocode when our robot scans the enemy
 void onWin(robocode.WinEvent e)
          onWin - called by robocode when our robot wins a round
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Movement

public Movement(robocode.AdvancedRobot robot)
Method Detail

onRobotFire

public void onRobotFire(double deltaEnergy)
onRobotFire - called by the robot when the enemy fires a bullet

Parameters:
deltaEnergy - - the power of the bullet fired

onScannedRobot

public void onScannedRobot(robocode.ScannedRobotEvent e)
onScannedRobot - called by robocode when our robot scans the enemy

Parameters:
ScannedRobotEvent - - enemy information

onHitByBullet

public void onHitByBullet(robocode.HitByBulletEvent e)
onHitByBullet - called by robocode when our robot gets hit by a bullet

Parameters:
HitByBulletEvent - - bullet information

onBulletHitBullet

public void onBulletHitBullet(robocode.BulletHitBulletEvent e)
onBulletHitBullet - called by robocode when one of our bullets hits an enemy bullet

Parameters:
BulletHitBulletEvent - - colliding bullet information

onHitWall

public void onHitWall(robocode.HitWallEvent e)
onHitWall - called by robocode when our robot hits a wall

Parameters:
HitWallEvent - - wall information

onHitRobot

public void onHitRobot(robocode.HitRobotEvent e)
onHitRobot - called by robocode when our robot hits another robot

Parameters:
HitRobotEvent - - collision information

onDeath

public void onDeath(robocode.DeathEvent e)
onDeath - called by robocode when our robot dies

Parameters:
DeathEvent -

onWin

public void onWin(robocode.WinEvent e)
onWin - called by robocode when our robot wins a round

Parameters:
onWin -

onPaint

public void onPaint(java.awt.Graphics2D g)
onPaint - called by robocode when our robot can draw to the screen

Parameters:
Graphic2D - - painting tool