|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.colossus.appmain.Start
public final class Start
Class Start contains code to start the different types of games.
Field Summary | |
---|---|
private CmdLine |
cmdLine
|
private static java.util.logging.Logger |
LOGGER
|
private Options |
startOptions
|
private WhatNextManager |
whatNextManager
|
Constructor Summary | |
---|---|
Start(java.lang.String[] args)
To create the one "Start" object which handles initiates the "whatToDoNext" action according to what the user wants. |
Method Summary | |
---|---|
private void |
commandLineProcessing(java.lang.String[] args)
Prepare the "Opts" object to parse all options from command line. |
Options |
getStartOptions()
|
WhatNextManager |
getWhatNextManager()
|
WhatNextManager.WhatToDoNext |
getWhatToDoNext()
|
static void |
main(java.lang.String[] args)
|
private void |
runGetPlayersDialogAndWait(Options options)
Bring up the GetPlayers dialog, and then wait until is has set startObject to the next action to do and notified us to continue. |
private void |
runNetClientDialogAndWait()
|
void |
setInitialAction(Options serverOptions,
Options netclientOptions)
Based on command line options -c, -w, possibly -g, set startObject to the right "whatToDoNext" action and set in startOptions the related values. |
private void |
setupAndLoop()
Do the setup of the various Options objects (server, netclient), some more preparations, and then it stays in the loop which - waits for user input what to do next - initiates that action and waits until it completes (or if canceled, like closing the network client dialog, bring up back the main (=GetPlayers) dialog, or if user requests Quit, exit the loop; and when it exited the loop control will return back to main() and the JVM should terminate sooner or later ;-) |
private boolean |
setupOptionsFromCommandLine(CmdLine cl,
Options startOptions,
Options options)
|
private boolean |
startNetClient(Options startOptions)
|
private static void |
usage(Opts opts)
Print a usage string to stdout. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.util.logging.Logger LOGGER
private CmdLine cmdLine
private final WhatNextManager whatNextManager
private final Options startOptions
Constructor Detail |
---|
public Start(java.lang.String[] args)
Method Detail |
---|
public Options getStartOptions()
public WhatNextManager getWhatNextManager()
public WhatNextManager.WhatToDoNext getWhatToDoNext()
private static void usage(Opts opts)
private void commandLineProcessing(java.lang.String[] args)
args
- The String-Array given to main()public void setInitialAction(Options serverOptions, Options netclientOptions)
private void runGetPlayersDialogAndWait(Options options)
options
- The "server side" main options Object which holds the
information what kind of game to play next (variant, which players)
and the "Game options" for the to-be-started game, like
unlimitedMulligans, viewmode, balancedTowers, ...)private boolean setupOptionsFromCommandLine(CmdLine cl, Options startOptions, Options options)
private void setupAndLoop()
private void runNetClientDialogAndWait()
private boolean startNetClient(Options startOptions)
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |