|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object soc.message.SOCMessage soc.message.SOCGames
public class SOCGames
This message lists all the soc games currently on a server,
without game options
.
It's constructed and sent for each connecting client
which can't understand game options (older than 1.1.07).
Version 1.1.06 and later:
Any game's name within the list may start with the "unjoinable"
marker prefix MARKER_THIS_GAME_UNJOINABLE
.
SOCGamesWithOptions
,
Serialized FormField Summary | |
---|---|
private java.util.Vector<java.lang.String> |
games
List of games (Strings) |
static char |
MARKER_THIS_GAME_UNJOINABLE
If this is the first character of a game name, the client is too limited to be able to play that game, due to properties of the game (large board, expansion rules, etc.) which may require a newer client. |
private static long |
serialVersionUID
|
static int |
VERSION_FOR_UNJOINABLE
Minimum version (1.1.06) of client/server which recognize and send MARKER_THIS_GAME_UNJOINABLE . |
Constructor Summary | |
---|---|
SOCGames(java.util.Vector<java.lang.String> ga)
Create a Games Message. |
Method Summary | |
---|---|
java.util.Vector<java.lang.String> |
getGames()
|
static SOCGames |
parseDataStr(java.lang.String s)
Parse the command String into a Games message |
java.lang.String |
toCmd()
GAMES sep games |
static java.lang.String |
toCmd(java.util.Vector<?> ga)
GAMES sep games |
java.lang.String |
toString()
Simple human-readable representation, used for debug purposes. |
Methods inherited from class soc.message.SOCMessage |
---|
arrayIntoStringBuf, enumIntoStringBuf, getClassNameShort, getMaximumVersion, getMinimumVersion, 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
public static final char MARKER_THIS_GAME_UNJOINABLE
This marker may be used in other message types which may introduce a new game,
such as SOCNewGame
and SOCNewGameWithOptions
.
Besides those, this marker is not used in any other message types, such as SOCDeleteGame
.
The game name appears 'un-marked' in those other types.
public static final int VERSION_FOR_UNJOINABLE
MARKER_THIS_GAME_UNJOINABLE
.
private java.util.Vector<java.lang.String> games
Constructor Detail |
---|
public SOCGames(java.util.Vector<java.lang.String> ga)
ga
- list of game names (Strings).
Mark unjoinable games with the prefix
MARKER_THIS_GAME_UNJOINABLE
.Method Detail |
---|
public java.util.Vector<java.lang.String> getGames()
public java.lang.String toCmd()
toCmd
in class SOCMessage
public static java.lang.String toCmd(java.util.Vector<?> ga)
ga
- the list of games, as a mixed-content vector of Strings and/or SOCGame
s;
if a client can't join a game, it should be a String prefixed with
MARKER_THIS_GAME_UNJOINABLE
.
public static SOCGames parseDataStr(java.lang.String s)
s
- the String to parse
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 |