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
-
Instructions()
- When you construct an Instructions this way,
the resulting Instructions say "do nothing".
-
Instructions(double, double)
-
-
Instructions(double, double, boolean)
-
-
Instructions(double, double, boolean, boolean, int)
-
-
Instructions(Instructions)
-
-
fireRocketAt(int)
- Fires a rocket at the robot 'targetNumber'.
-
getAim()
-
-
getFire()
-
-
getFireRocket()
-
-
getRotation()
-
-
getSpeed()
-
-
mix(Instructions)
- The idea here is that this should react correctly
for the simulation when it gets two instructions
for the same step.
-
setAim(int)
-
-
setFire(boolean)
-
-
setFireRocket(boolean)
- Note that if set to true, aim must be set as well
-
setRotation(double)
-
-
setSpeed(double)
-
Instructions
public Instructions()
- When you construct an Instructions this way,
the resulting Instructions say "do nothing".
This is usually what you want.
Instructions
public Instructions(Instructions mouse)
Instructions
public Instructions(double nRot,
double nSpeed)
Instructions
public Instructions(double nRot,
double nSpeed,
boolean nFire)
Instructions
public Instructions(double nRot,
double nSpeed,
boolean nFire,
boolean rFire,
int target)
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)
fireRocketAt
public void fireRocketAt(int targetNumber)
- Fires a rocket at the robot 'targetNumber'. To cancel the
fire, use setFireRocket(false) before the rocket goes.
setSpeed
public void setSpeed(double nSpeed)
setRotation
public void setRotation(double nRot)
setFire
public void setFire(boolean nFire)
setFireRocket
public void setFireRocket(boolean nFire)
- Note that if set to true, aim must be set as well
setAim
public void setAim(int nAim)
getSpeed
public double getSpeed()
getRotation
public double getRotation()
getFire
public boolean getFire()
getFireRocket
public boolean getFireRocket()
getAim
public int getAim()
All Packages Class Hierarchy This Package Previous Next Index