rc.yoda.plugin.moves
Class Ataru

java.lang.Object
  extended by rc.yoda.utils.Movement
      extended by rc.yoda.utils.Surfer
          extended by rc.yoda.plugin.moves.Ataru

public class Ataru
extends Surfer

Ataru is a Wave Surfing Movement for Yoda that encapsulates the true surfing algorithm

Version:
v1.0
Author:
Robert Codd

Field Summary
 
Fields inherited from class rc.yoda.utils.Surfer
ROLLING_DEPTH
 
Constructor Summary
Ataru(robocode.AdvancedRobot robot)
          Constructor: What do we do when someone create an instance of Ataru
 
Method Summary
 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 onHitByBullet(robocode.HitByBulletEvent e)
          Event method called by Robocode when this robot gets hit by a bullet
 void onPaint(java.awt.Graphics2D g)
          Event method called by Robocode when this robot is allowed to draw debugging graphics to the screen
 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
 
Methods inherited from class rc.yoda.utils.Movement
onDeath, onHitRobot, onHitWall, onWin
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ataru

public Ataru(robocode.AdvancedRobot robot)
Constructor: What do we do when someone create an instance of Ataru

Method Detail

onRobotFire

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

Overrides:
onRobotFire in class Surfer
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

Overrides:
onScannedRobot in class Surfer
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

Overrides:
onHitByBullet in class Surfer
Parameters:
HitByBulletEvent - information about ther bullet that hit this robot

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

Overrides:
onBulletHitBullet in class Surfer
Parameters:
BulletHitBulletEvent - information about the bullets

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

Overrides:
onPaint in class Movement
Parameters:
Graphics2D - graphics that provides drawing method for painting