public abstract class AbstractReferee
extends java.lang.Object
Constructor and Description |
---|
AbstractReferee() |
Modifier and Type | Method and Description |
---|---|
abstract void |
gameTurn(int turn)
Called on the computation of each turn of the game.
|
abstract java.util.Properties |
init(java.util.Properties params)
Called on startup, this method exists to create the initial state of the game, according to the given input.
|
void |
onEnd()
Optional.
|
public abstract java.util.Properties init(java.util.Properties params)
Called on startup, this method exists to create the initial state of the game, according to the given input.
Typically, params
contains at least a seed.
The seed is used to generated other parameters such as width and height, then those parameters are placed in the return Properties
with the seed.
If those parameters are present in the given input, the input values should override the generated values.
params
- a Properties
containing input info for the referee.Properties
containing game data that can be used as input for a later game.public abstract void gameTurn(int turn)
A typical game turn:
Player
active on this turn.executed
.turn
- which turn of the game is currently being computed.public void onEnd()
Optional.
This method is called once the final turn of the game is computed.Typically, this method is used to set the players' final scores according to the final state of the game.