|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.ou.mlfw.World<STATE,ACTION>
public class World<STATE,ACTION>
World is where a Simulator, that simulator's Controllables, and a set of Clients are all brought together, and an instance of the simulator is run. The initialization process is largely driven by a World configuration file or object that points to a Simulator configuration and the various Client configurations, and specifies how clients are paired with Controllables. This class also provides control for the gui if display is desired by the user.
Nested Class Summary | |
---|---|
static class |
World.Arguments
A throwaway class that encapsulates the command line arguments for World. |
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_CONFIG
|
Constructor Summary | |
---|---|
World(WorldConfig worldconfig)
Initialize the simulator, initialize each client, and bind each controllable to its client. |
Method Summary | |
---|---|
static void |
exit(java.lang.String exitMessage)
Exits the program with usage instructions. |
java.util.List<Record> |
getRecords()
Return a list of Records, corresponding to the statistics stored for each controllable over the course of a game. |
static void |
main(java.lang.String[] args)
Load up the specified or default configs and start an instance of the simulator run. |
static World.Arguments |
parseArgs(java.lang.String[] args)
Handle the command-line arguments passed to an invocation of World. |
void |
run()
The basic run loop. |
void |
runGUI()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_CONFIG
Constructor Detail |
---|
public World(WorldConfig worldconfig) throws java.lang.InstantiationException, java.lang.IllegalAccessException, NameCollisionException, OverboundControllableException, UnboundClientException, UnboundControllableException, java.lang.ClassNotFoundException, java.io.FileNotFoundException, java.io.IOException
java.lang.IllegalAccessException
java.lang.InstantiationException
NameCollisionException
UnboundClientException
UnboundControllableException
OverboundControllableException
java.lang.ClassNotFoundException
java.io.FileNotFoundException
java.io.IOException
Method Detail |
---|
public void run()
public void runGUI()
public java.util.List<Record> getRecords()
public static void main(java.lang.String[] args)
args
- public static World.Arguments parseArgs(java.lang.String[] args)
args
- The arguments string.
public static void exit(java.lang.String exitMessage)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |