rc.yoda.utils
Class VirtualBullet

java.lang.Object
  extended by rc.yoda.utils.VirtualBullet

public class VirtualBullet
extends java.lang.Object

VirutalBullet that contains the atributtes needed to update and track a Virtual Bullet for Gun Stats

Version:
v1.0
Author:
Robert Codd

Field Summary
 java.lang.String gunName
          The name of the Gun that fired this Virtual Bullet
 double heading
          The heading in radians this Virtual Bullet is travlling
 java.awt.geom.Point2D.Double location
          The current location of this Virtual Bullet
 boolean real
          Whether this Virtual bullet is also reconized by Robocode as a bullet
 double velocity
          The velocity this Virtual Bullet is travelling
 
Constructor Summary
VirtualBullet(java.lang.String gunName, java.awt.geom.Point2D.Double location, double heading, double velocity, boolean real)
          Class constructor specifying the Name of the firing Gun, the VirtualBullets initial location, the VirtuaBullets heading and velocity and whether it was fire by the robot
 
Method Summary
 void update()
          Advances the location of this VirtualBullet one tick in the furture
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gunName

public java.lang.String gunName
The name of the Gun that fired this Virtual Bullet


location

public java.awt.geom.Point2D.Double location
The current location of this Virtual Bullet


heading

public double heading
The heading in radians this Virtual Bullet is travlling


velocity

public double velocity
The velocity this Virtual Bullet is travelling


real

public boolean real
Whether this Virtual bullet is also reconized by Robocode as a bullet

Constructor Detail

VirtualBullet

public VirtualBullet(java.lang.String gunName,
                     java.awt.geom.Point2D.Double location,
                     double heading,
                     double velocity,
                     boolean real)
Class constructor specifying the Name of the firing Gun, the VirtualBullets initial location, the VirtuaBullets heading and velocity and whether it was fire by the robot

Method Detail

update

public void update()
Advances the location of this VirtualBullet one tick in the furture