|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.amis.pogamut.base.communication.messages.CommandMessage
cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.Dodge
public class Dodge
Representation of the GameBots2004 command DODGE. Causes the bot to dodge to supported direction. Only one (successful) dodge per second allowed.
Field Summary | |
---|---|
protected Location |
Direction
Relative vector, will be normalized. |
protected Boolean |
Double
If true performs a double dodge in specified direction. |
protected Location |
FocusPoint
Point the bot should focus after dodge command. |
static String |
PROTOTYPE
Example how the message looks like - used during parser tests. |
protected Boolean |
Wall
Attemtps to do a wall dodge. |
Constructor Summary | |
---|---|
Dodge()
Creates new instance of command Dodge. |
|
Dodge(Dodge original)
Cloning constructor. |
|
Dodge(Location Direction,
Location FocusPoint,
Boolean Wall,
Boolean Double)
Creates new instance of command Dodge. |
Method Summary | |
---|---|
Location |
getDirection()
Relative vector, will be normalized. |
Location |
getFocusPoint()
Point the bot should focus after dodge command. |
Boolean |
isDouble()
If true performs a double dodge in specified direction. |
Boolean |
isWall()
Attemtps to do a wall dodge. |
Dodge |
setDirection(Location Direction)
Relative vector, will be normalized. |
Dodge |
setDouble(Boolean Double)
If true performs a double dodge in specified direction. |
Dodge |
setFocusPoint(Location FocusPoint)
Point the bot should focus after dodge command. |
Dodge |
setWall(Boolean Wall)
Attemtps to do a wall dodge. |
String |
toHtmlString()
|
String |
toMessage()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String PROTOTYPE
protected Location Direction
protected Location FocusPoint
protected Boolean Wall
protected Boolean Double
Constructor Detail |
---|
public Dodge(Location Direction, Location FocusPoint, Boolean Wall, Boolean Double)
Direction
- Relative vector, will be normalized. The direction of the
dodge will be added to current bot rotation.FocusPoint
- Point the bot should focus after dodge command. Note that if not specified, this will be set automatically by dodge command to 1200 ut units in front of the bot at the time when the dodge command is issued.Wall
- Attemtps to do a wall dodge. There has to be a wall in the opposite direction of the dodge. If there isn't, nothing will happen! This switch overrides "Double" dodge switch.Double
- If true performs a double dodge in specified direction.public Dodge()
public Dodge(Dodge original)
original
- Method Detail |
---|
public Location getDirection()
public Dodge setDirection(Location Direction)
public Location getFocusPoint()
public Dodge setFocusPoint(Location FocusPoint)
public Boolean isWall()
public Dodge setWall(Boolean Wall)
public Boolean isDouble()
public Dodge setDouble(Boolean Double)
public String toString()
toString
in class CommandMessage
public String toHtmlString()
public String toMessage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |