|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsoc.message.SOCMessage
soc.message.SOCChangeFace
public class SOCChangeFace
This message says that a player is changing the face icon.
Although this is a game-specific message, it's handled by SOCServer instead of a GameHandler.
| Field Summary | |
|---|---|
private int |
faceId
The id of the face image |
private java.lang.String |
game
Name of game |
private int |
playerNumber
The number player that is changing |
private static long |
serialVersionUID
|
| Constructor Summary | |
|---|---|
SOCChangeFace(java.lang.String ga,
int pn,
int id)
Create a ChangeFace message. |
|
| Method Summary | |
|---|---|
int |
getFaceId()
|
java.lang.String |
getGame()
Name of game this message is for. |
int |
getPlayerNumber()
|
static SOCChangeFace |
parseDataStr(java.lang.String s)
Parse the command String into a ChangeFace message |
java.lang.String |
toCmd()
CHANGEFACE sep game sep2 playerNumber sep2 faceId |
static java.lang.String |
toCmd(java.lang.String ga,
int pn,
int id)
CHANGEFACE sep game sep2 playerNumber sep2 faceId |
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 |
| Methods inherited from interface soc.message.SOCMessageForGame |
|---|
getType |
| Field Detail |
|---|
private static final long serialVersionUID
private java.lang.String game
private int playerNumber
private int faceId
| Constructor Detail |
|---|
public SOCChangeFace(java.lang.String ga,
int pn,
int id)
ga - the name of the gamepn - the number of the changing playerid - the id of the face image;
1 and higher are human face images, 0 is the default robot, -1 is the smarter robot.| Method Detail |
|---|
public java.lang.String getGame()
SOCMessageForGamenull if message is in per-game structures or code.
At the server, the message treater dispatches incoming SOCMessageForGames
based on their getGame():
null: Message is ignored
SOCMessage.GAME_NONE: Message is handled by SOCServer itself
GameHandler for that game's type. If no game with that name is found,
the message is ignored.
getGame in interface SOCMessageForGameSOCMessage.GAME_NONEpublic int getPlayerNumber()
public int getFaceId()
public java.lang.String toCmd()
toCmd in class SOCMessage
public static java.lang.String toCmd(java.lang.String ga,
int pn,
int id)
ga - the name of the gamepn - the number of the changing playerid - the id of the face image
public static SOCChangeFace 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 | |||||||||