These services have the form:
<library_name>::<service>
<library_name> can be one of "Math", "Yagga", "Sys" and any other Java class name given in the LibClasses section of the config file.
In such a case, only the unqualified class name must be used, e.g. if you have registered the class "com.mysoft.lib.Print", you must use "Print" as a library name.
You should avoid name conflicts. Services are listed in alphabetical order.
object[] getAll(string className);
returns all the object of the game, at the time of the library call, belonging to the specified class.
void createIntrospectionViews(object objRef)
creates default "introspective" views of the object passed as a parameter.
Default introspective view for PbML version Alpha 1.5 is just the list of commands available, including commands "emerging" from devices. Please note that the views are sent to the owner of objRef, not the owner of the object who calls this service.
In order to send infos to the caller object simply pass the "self" object reference as a parameter.
There is one view per command (or device's command).
The format of each view is
{
type="introspection"
subtype="command"
name=<command_name>
param_1_type=<first param type>
param_1_name=<first param name>
...
param_N_type=<last param type>
param_N_name=<last param name>
}
void debug(string msg);
print out a debug string in the debug file (if defined) or on the standard error (STDERR).
int turnNumber();
returns the current turn the server is executing. Usually this information is stored in the filename of the current data file.
void removePlayer(string player)
removes the given player from the list of active players of the current game. The player will be removed at the end of the current phase. From next phase no views to the player will be generated, no commands will be expected from that player.
void skipPhase(string phase)
tells Yagga engine to skip the given phase when it should execute it. The phase can occurr any time in the future. If, during the execution of the server following this instruction, the engine should execute such phase, it will instead skip it and continue with the phase following the given one.
void jumpToPhase(string phase)
tells Yagga engine to jump to the given phase at the end of the current phase, skipping the execution of every phase/sub-phase that is specified before the given one.
string getTurnId(object objRef)
returns the temporary id (guaranteed to be unique in the same turn)
returns a comma separated list of the temporary ids of the objects contained in the list.
string collateArrayAttrib(object list[], string attribName)
returns a comma separated list of attrib values in an array of objects