rc.yoda.plugin.guns
Class Shoto

java.lang.Object
  extended by rc.yoda.utils.Gun
      extended by rc.yoda.plugin.guns.Shoto

public class Shoto
extends Gun

Electrum a Guess Factor targeting gun

Version:
v1.0
Author:
Robert Codd

Constructor Summary
Shoto(robocode.AdvancedRobot robot)
          Class Constructor specifying the robot this gun is virtually mounted on
 
Method Summary
 double getBulletPower()
          Returns the power of the bullet this gun wants to fire caculated in onScannedRobot
 double getFireAngle()
          Returns the angle to fire this gun wants to fire caculated in onScannedRobot
 void onBulletHit(robocode.BulletHitEvent e)
          onBulletHit - called by robocode when one of our bullets hit the enemy
 void onBulletHitBullet(robocode.BulletHitBulletEvent e)
          onBulletHitBullet - called by robocode when one of our bullets hits an enemy 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 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.Gun
onBulletMissed, onDeath, onWin
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Shoto

public Shoto(robocode.AdvancedRobot robot)
Class Constructor specifying the robot this gun is virtually mounted on

Method Detail

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 Gun
Parameters:
ScannedRobotEvent - information about the scanned robot

onBulletHitBullet

public void onBulletHitBullet(robocode.BulletHitBulletEvent e)
Description copied from class: Gun
onBulletHitBullet - called by robocode when one of our bullets hits an enemy bullet

Overrides:
onBulletHitBullet in class Gun

onBulletHit

public void onBulletHit(robocode.BulletHitEvent e)
Description copied from class: Gun
onBulletHit - called by robocode when one of our bullets hit the enemy

Overrides:
onBulletHit in class Gun

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 Gun
Parameters:
Graphics2D - graphics that provides drawing method for painting

getBulletPower

public double getBulletPower()
Returns the power of the bullet this gun wants to fire caculated in onScannedRobot

Overrides:
getBulletPower in class Gun
Returns:
double power of the bullet this Gun wants to shoot

getFireAngle

public double getFireAngle()
Returns the angle to fire this gun wants to fire caculated in onScannedRobot

Overrides:
getFireAngle in class Gun
Returns:
double angle at which this Gun wants to shoot