com.springrts.ai.oo
Class Engine
java.lang.Object
com.springrts.ai.oo.Engine
- All Implemented Interfaces:
- Comparable<Engine>
public class Engine
- extends Object
- implements Comparable<Engine>
compareTo
public int compareTo(Engine other)
- Specified by:
compareTo
in interface Comparable<Engine>
equals
public boolean equals(Object otherObject)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
handleCommand
public int handleCommand(int toId,
int commandId,
AICommand command)
- Whenever an AI wants to change the engine state in any way,
it has to call this method.
In other words, all commands from AIs to the engine (and other AIs)
go through this method.
- Parameters:
teamId
- the team number of the AI that sends the commandtoId
- the team number of the AI that should receive
the command, or COMMAND_TO_ID_ENGINE if it is addressed
to the enginecommandId
- used on asynchronous commands, this allows the AI to
identify a possible result event, which would come
with the same idcommandTopic
- unique identifier of a command
(see COMMAND_* defines in AISCommands.h)commandData
- a commandTopic specific struct, which contains
the data associated with the command
(see *Command structs)
- Returns:
- 0: if command handling ok
!= 0: something else otherwise
getVersion
public Version getVersion()