public class TournamentController
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static int |
HEIGHT |
protected java.lang.String |
localhost |
static int |
MAX_PORTS |
protected static int |
PORT_BASE |
protected static int |
portCounter |
protected static java.lang.String |
RESULTS_DIR |
protected int |
sets |
protected long |
timeout |
protected static int |
WIDTH |
Constructor and Description |
---|
TournamentController() |
Modifier and Type | Method and Description |
---|---|
protected java.util.List<ReversiPlayerInterface> |
createPlayerList()
Here, instantiate the player - by enumeration or reflection, your call.
|
protected java.util.List<ReversiPlayerInterface> |
createPlayerListByReflection() |
protected int |
getFreePort() |
protected java.util.List<ReversiPlayerInterface> |
getPlayersFromDir(java.lang.String dir) |
protected void |
initLocalhost()
Initializes the #localhost String.
|
static void |
main(java.lang.String[] args) |
protected ReversiGameResult |
playGame(ReversiPlayerInterface p1,
ReversiPlayerInterface p2,
int player1Port,
int player2Port) |
protected void |
processResults(java.util.List<ReversiGameResult> results) |
protected java.util.List<ReversiGameResult> |
run() |
protected void |
writeInfo(int gamesCounter,
int totalGames,
ReversiPlayerInterface p1,
ReversiPlayerInterface p2,
long startTime) |
protected static final int WIDTH
protected static final int HEIGHT
protected static java.lang.String RESULTS_DIR
protected static volatile int portCounter
public static final int MAX_PORTS
protected long timeout
protected int sets
protected static final int PORT_BASE
protected java.lang.String localhost
public static void main(java.lang.String[] args)
protected void processResults(java.util.List<ReversiGameResult> results)
protected java.util.List<ReversiGameResult> run()
protected void writeInfo(int gamesCounter, int totalGames, ReversiPlayerInterface p1, ReversiPlayerInterface p2, long startTime) throws java.rmi.RemoteException
java.rmi.RemoteException
protected ReversiGameResult playGame(ReversiPlayerInterface p1, ReversiPlayerInterface p2, int player1Port, int player2Port) throws java.lang.Exception
java.lang.Exception
protected java.util.List<ReversiPlayerInterface> createPlayerList()
protected java.util.List<ReversiPlayerInterface> createPlayerListByReflection()
protected java.util.List<ReversiPlayerInterface> getPlayersFromDir(java.lang.String dir)
protected void initLocalhost() throws java.net.UnknownHostException
java.net.UnknownHostException
protected int getFreePort()