|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--player.Command
Abstract class that implements robot commmands to send to the game server.
Constructor Summary | |
protected |
Command()
Creates a robot command. |
Method Summary | |
abstract String |
getArguments()
Method to get the optional arguments for a command |
int |
getBid()
Method to get the bid for this command. |
int |
getCost()
Method to get the cost of this command. |
abstract String |
getName()
Method to get the name of this command. |
void |
pkgAdd(Pkg pkg)
Method to add a package to the command package list. |
void |
pkgRemove(Pkg pkg)
Method to remove a package to the command package list. |
void |
setBid(int bid)
Method to set the bid for this command. |
void |
setDirection(int direction)
Method to set the movement direction of this command. |
String |
toString()
Method to return the command as a well formatted string suitable for sending to the game server. |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
protected Command()
Method Detail |
public final int getBid()
public final void setBid(int bid)
bid
- The bid for the command.public final int getCost()
public abstract String getName()
public void setDirection(int direction)
Command
is a no-op. Subclasses
should override this method.)direction
- The direction of the movement.Direction
public void pkgAdd(Pkg pkg)
Command
is a no-op. Subclasses
should override this method.)pkg
- The package to add to the command list.public void pkgRemove(Pkg pkg)
Command
is a no-op. Subclasses
should override this method.)pkg
- The package to remove from the command list.public abstract String getArguments()
public final String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |