warbot.kernel
Class RocketLauncher
java.lang.Object
SEdit.SElement
SEdit.SNode
warbot.kernel.Entity
warbot.kernel.MovableEntity
warbot.kernel.BasicBody
warbot.kernel.RocketLauncher
- All Implemented Interfaces:
- java.io.Serializable
public class RocketLauncher
- extends BasicBody
- See Also:
- Serialized Form
Fields inherited from class warbot.kernel.BasicBody |
ACTIONS, BAG_CAPACITY, behaviorFileName, brainClass, DISTANCE_TO_EAT, DISTANCE_TO_TAKE, DROP, DROPALL, EAT, maximumEnergy, TAKE |
Fields inherited from class warbot.kernel.Entity |
action, actionIn, detectingRange, displaySize, energy, initialEnergy, NULL, radius, showDetect, showEnergyLevel, speed, x, xdisplay, y, ydisplay |
Method Summary |
void |
buildRocket()
try to do the action of building a rocket for future launch |
double |
getCoveredDistance()
returns the distance covered during the last time unit. |
int |
getEnergy()
return the current energy of the robot |
double |
getHeading()
get the robot's current heading |
int |
getRadius()
|
int |
getRocketNb()
|
boolean |
getShot()
|
java.lang.String |
getTeam()
return the current team as a String Object |
void |
launchRocket(double direction)
try to do the action of launching a rocket in the direction wanted
to do this kind of action you have to be rocket launcher,
this is done by play the role of rocket launcher. |
Percept |
makePercept(double dx,
double dy,
double d)
|
boolean |
moving()
|
void |
setHeading(double direction)
set the robot heading to the direction of value |
Methods inherited from class warbot.kernel.BasicBody |
createAgent, createDefaultImage, delete, die, drop, dropAll, eat, edit, getBagCapacity, getBehaviorFileName, getBrainClass, getMaximumEnergy, getPercepts, getResourceLevel, getUserMessage, increaseEnergyLevel, init, inMyBag, isMyBagEmpty, isMyBagFull, isShowMessages, isShowUserMessage, makeBrain, move, nbOfObjectsInMyBag, setBehaviorFileName, setBrainClass, setPercepts, setShowMessages, setShowUserMessage, setUserMessage, take, toggleShowMessages, toggleShowUserMessage, tryEat |
Methods inherited from class warbot.kernel.Entity |
addInArrow, addOutArrow, decreaseEnergyLevel, distanceFrom, dropEntity, getDetectingRange, getEnergy, getEnvironmentAgent, getInArrows, getName, getOutArrows, getRadius, getShot, getShowDetect, getShowEnergyLevel, getSpeed, getTeam, getX, getY, isConnectable, setDetectingRange, setEnergy, setEnvironmentAgent, setName, setRadius, setShowDetect, setShowEnergyLevel, setSpeed, setTeam, setX, setY, toggleShowDetect, toggleShowEnergyLevel, toString |
Methods inherited from class SEdit.SElement |
dump, getComment, getDescriptor, getGObject, getID, getLabel, getStructure, inspect, setComment, setDescriptor, setGObject, setID, setLabel, setStructure |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
maximumRocket
protected static final int maximumRocket
- See Also:
- Constant Field Values
rocketNb
protected int rocketNb
SHOOT
protected static final int SHOOT
- See Also:
- Constant Field Values
BUILD_ROCKET
protected static final int BUILD_ROCKET
- See Also:
- Constant Field Values
RocketLauncher
public RocketLauncher(WarbotEnvironment env,
Brain b,
java.lang.String team)
RocketLauncher
public RocketLauncher()
makePercept
public Percept makePercept(double dx,
double dy,
double d)
- Overrides:
makePercept
in class BasicBody
launchRocket
public void launchRocket(double direction)
- try to do the action of launching a rocket in the direction wanted
to do this kind of action you have to be rocket launcher,
this is done by play the role of rocket launcher.
As the action move, it is useless to call this method several time in the doIt: at most
just one rocket will be launched
- Overrides:
launchRocket
in class BasicBody
buildRocket
public void buildRocket()
- Description copied from class:
BasicBody
- try to do the action of building a rocket for future launch
- Overrides:
buildRocket
in class BasicBody
getRocketNb
public int getRocketNb()
- Overrides:
getRocketNb
in class BasicBody
setHeading
public void setHeading(double direction)
- set the robot heading to the direction of value
getHeading
public double getHeading()
- get the robot's current heading
getTeam
public java.lang.String getTeam()
- return the current team as a String Object
getCoveredDistance
public double getCoveredDistance()
- returns the distance covered during the last time unit. This method may
be called to sum the path taken by agents.
getEnergy
public int getEnergy()
- return the current energy of the robot
getShot
public boolean getShot()
moving
public boolean moving()
getRadius
public int getRadius()
Copyright © Madkit Team (O. Gutknecht, J. Ferber, F. Michel et al.) All Rights Reserved.