|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsoc.message.SOCMessage
soc.message.SOCGameOptionGetDefaults
public class SOCGameOptionGetDefaults
Information on current defaults for new games' game options
.
Based on server's current values (.getIntValue()
,
not .defaultIntValue
field).
Client sends this when the user clicks the "New Game" button for the first time.
Server responds to client's GAMEOPTIONGETDEFAULTS by sending its own GAMEOPTIONGETDEFAULTS.
All of server's known options are sent, except empty string-valued options.
Depending on client version, server's response may include option names that
the client is too old to use; the client is able to ignore them.
If the client asks about such an option (by sending GAMEOPTIONINFO
),
the server will respond with GAMEOPTIONINFO(OTYPE_UNKNOWN)
.
Introduced in 1.1.07; check server version against SOCNewGameWithOptions.VERSION_FOR_NEWGAMEWITHOPTIONS
before sending this message.
Robot clients don't need to know about or handle this message type, because they don't create games.
I18N: Since the client's New Game dialog will need localized strings for all
SOCScenario
s, v2.0.00 sends those strings before the game option
default values so that the client will have them before showing the dialog.
The strings are sent using SOCLocalizedStrings
.
Field Summary | |
---|---|
private java.lang.String |
opts
String of the options (name-value pairs) as sent over network |
private static long |
serialVersionUID
|
Constructor Summary | |
---|---|
SOCGameOptionGetDefaults(java.lang.String opts)
Create a GameOptionGetDefaults message. |
Method Summary | |
---|---|
int |
getMinimumVersion()
Minimum version where this message type is used. |
java.lang.String |
getOpts()
Get the string of option name-value pairs sent over the network. |
static SOCGameOptionGetDefaults |
parseDataStr(java.lang.String s)
Parse the command String into a GameOptionGetDefaults message |
java.lang.String |
toCmd()
GAMEOPTIONGETDEFAULTS [sep opts] |
static java.lang.String |
toCmd(java.lang.String opts)
GAMEOPTIONGETDEFAULTS [sep opts] |
java.lang.String |
toString()
Simple human-readable representation, used for debug purposes. |
Methods inherited from class soc.message.SOCMessage |
---|
arrayIntoStringBuf, enumIntoStringBuf, getClassNameShort, getMaximumVersion, getType, isSingleLineAndSafe, isSingleLineAndSafe, toMsg |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private java.lang.String opts
Constructor Detail |
---|
public SOCGameOptionGetDefaults(java.lang.String opts)
opts
- the options string, or null if none (client to server).
To create the string, call
SOCGameOption.packOptionsToString(opts, true)
.Method Detail |
---|
public java.lang.String getOpts()
SOCGameOptions
,
call SOCGameOption.parseOptionsToMap()
.
public java.lang.String toCmd()
toCmd
in class SOCMessage
public static java.lang.String toCmd(java.lang.String opts)
opts
- the options string, or null if none (cli->serv)
public static SOCGameOptionGetDefaults parseDataStr(java.lang.String s)
s
- the String to parse
public int getMinimumVersion()
getMinimumVersion
in class SOCMessage
public java.lang.String toString()
SOCMessage
toString
in class SOCMessage
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |