A basic understanding of XML is assumed in this description.
The interface between the launcher and the inonit.domain.game.card.hearts
package is still being developed actively. As such, this file format is subject to change and little effort will be made
to make future formats compatible with this one.
hearts
Attributes: | (None) |
Contains: | (game | tournament), players |
game or tournament element describes a game or tournament to be
played. The players element describes the participants in that game or tournament.
|
game
Attributes: | (None) |
Contains: | rules, log |
rules element describes the rules of the game. The log element describes
destinations to which messages will be written.
|
rules
Currently, only the "Omnibus" (Jack of Diamonds is minus 10 points) version of Hearts is supported. The
variant implemented in Hearts requires the JD to be taken for a take-all, as well. There are API methods
to retrieve all of this information (e.g., in the
Intelligence.Game.Rules
class), so it does not need to be hard-coded. Additional variants are built into Hearts, but the
launcher does not currently interface with them.
Attributes: | scoreLimit handLimit | ||||||||||||
|
|||||||||||||
Contains: | EMPTY |
tournament
Attributes: | games | ||||||||
|
|||||||||
Contains: | game, log | ||||||||
game element acts as a description for each game in the tournament.
The log element describes destinations to which log messages should be written.
|
players
Attributes: | handTimeLimit | ||||||||
|
|||||||||
Contains: | (object | jar | process | directory | random)* | ||||||||
tournament , an implied random element named "Random" is always inserted
in addition to elements listed.
|
object
A Java class which implements the Intelligence
interface.
Attributes: | name class | ||||||||||||
|
|||||||||||||
Contains: | classpath? | ||||||||||||
classpath is specified, it is searched for player classes. Otherwise, the
player must be in the classes directory under the Hearts install.
|
classpath
Attributes: | (None) |
Contains: | EMPTY |
directory
Attributes: | path | ||||||||
|
|||||||||
Contains: | EMPTY |
jar
Attributes: | path | ||||||||
|
|||||||||
Contains: | EMPTY |
jar
A JAR file containing classes which contain an Intelligence
implementation. JAR files
must be packaged with the class name prepended to the ".jar" suffix (as the examples in the
players
directory do).
Attributes: | name path | ||||||||||||
|
|||||||||||||
Contains: | EMPTY |
process
A player which will be launched from a JAR file in a separate native process (i.e., a separate Java virtual machine). Launching a player in a subprocess involves substantial overhead; the option is provided for "fairness" reasons, since otherwise players cannot be fully isolated from one another (although this may be possible in the future). Problems with CPU contention and memory contention are difficult to solve, but the performance reduction subprocesses entail may cause this option to be removed in future versions.
Attributes: | name jar | ||||||||||||
|
|||||||||||||
Contains: | EMPTY |
directory
Causes a set of players to be added to the competition. The set is the set of JAR files in the given directory.
Attributes: | type path | ||||||||||||
|
|||||||||||||
Contains: | EMPTY |
random
A player which plays randomly. An implied random
named "Random" is added to all
tournament
s.
Attributes: | name | ||||||||
|
|||||||||
Contains: | EMPTY |
log
Attributes: | (None) |
Contains: | console?, file* |
console element indicates that log messages should be written to the console. A
file element indicates that they should be written to a file. If neither is indicated,
no log will be written. Multiple elements may be listed (i.e., logging may go to the console and
a file).
|
console
Attributes: | (None) |
Contains: | EMPTY |
file
Attributes: | path | ||||||||
|
|||||||||
Contains: | EMPTY |