rc.yoda.utils
Class Wave

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

public class Wave
extends java.lang.Object

Wave - A class which contains needed info for recontructing a wave of bullets

Version:
v 1.0
Author:
Robert Codd

Field Summary
 double bulletVelocity
          The speed at which this wave is traveling
 double directAngle
          The angle at which the target was when this Wave was fired
 int direction
          The direction the targetted robot was travelling when this Wave was fired
 double distanceTraveled
          The distance this Wave has traveled since the time it was fired
 java.awt.geom.Point2D.Double fireLocation
          This Waves point of orgin
 long fireTime
          The time at which this wave was fired
 int[] segments
          If factor stats are segmented then this Waves indexes are stored for reference on logging
 
Constructor Summary
Wave()
          Class Constructor
 
Method Summary
 double flightTime(java.awt.geom.Point2D.Double target)
          Calculates the time in which it will take this Wave to reach to specified target
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fireLocation

public java.awt.geom.Point2D.Double fireLocation
This Waves point of orgin


fireTime

public long fireTime
The time at which this wave was fired


bulletVelocity

public double bulletVelocity
The speed at which this wave is traveling


directAngle

public double directAngle
The angle at which the target was when this Wave was fired


distanceTraveled

public double distanceTraveled
The distance this Wave has traveled since the time it was fired


direction

public int direction
The direction the targetted robot was travelling when this Wave was fired


segments

public int[] segments
If factor stats are segmented then this Waves indexes are stored for reference on logging

Constructor Detail

Wave

public Wave()
Class Constructor

Method Detail

flightTime

public double flightTime(java.awt.geom.Point2D.Double target)
Calculates the time in which it will take this Wave to reach to specified target

Parameters:
Point2D.Double - location of Wave target
Returns:
double the amount of ticks it will take to reach the target