All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ch.jp.robwar.Instructions

java.lang.Object
   |
   +----ch.jp.robwar.Instructions

public class Instructions
extends Object
implements Serializable, Cloneable

Constructor Index

 o Instructions()
When you construct an Instructions this way, the resulting Instructions say "do nothing".
 o Instructions(double, double)
 o Instructions(double, double, boolean)
 o Instructions(double, double, boolean, boolean, int)
 o Instructions(Instructions)

Method Index

 o fireRocketAt(int)
Fires a rocket at the robot 'targetNumber'.
 o getAim()
 o getFire()
 o getFireRocket()
 o getRotation()
 o getSpeed()
 o mix(Instructions)
The idea here is that this should react correctly for the simulation when it gets two instructions for the same step.
 o setAim(int)
 o setFire(boolean)
 o setFireRocket(boolean)
Note that if set to true, aim must be set as well
 o setRotation(double)
 o setSpeed(double)

Constructors

 o Instructions
 public Instructions()
When you construct an Instructions this way, the resulting Instructions say "do nothing". This is usually what you want.

 o Instructions
 public Instructions(Instructions mouse)
 o Instructions
 public Instructions(double nRot,
                     double nSpeed)
 o Instructions
 public Instructions(double nRot,
                     double nSpeed,
                     boolean nFire)
 o Instructions
 public Instructions(double nRot,
                     double nSpeed,
                     boolean nFire,
                     boolean rFire,
                     int target)

Methods

 o mix
 public void mix(Instructions planB)
The idea here is that this should react correctly for the simulation when it gets two instructions for the same step. Considering that these instructions come from examining the same world, movement decisions replace the previous ones and one-time decisions (like fire) are OR ed.

Invariant: instructions.mix(new Instructions()) == instructions (in value, not only in reference)

 o fireRocketAt
 public void fireRocketAt(int targetNumber)
Fires a rocket at the robot 'targetNumber'. To cancel the fire, use setFireRocket(false) before the rocket goes.

 o setSpeed
 public void setSpeed(double nSpeed)
 o setRotation
 public void setRotation(double nRot)
 o setFire
 public void setFire(boolean nFire)
 o setFireRocket
 public void setFireRocket(boolean nFire)
Note that if set to true, aim must be set as well

 o setAim
 public void setAim(int nAim)
 o getSpeed
 public double getSpeed()
 o getRotation
 public double getRotation()
 o getFire
 public boolean getFire()
 o getFireRocket
 public boolean getFireRocket()
 o getAim
 public int getAim()

All Packages  Class Hierarchy  This Package  Previous  Next  Index