|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectsoc.message.SOCMessage
soc.message.SOCDevCard
This message means that a player is drawing or playing a development card
| Field Summary | |
private int |
actionType
Action type |
static int |
ADDNEW
dev card action ADDNEW: Add as new to player's hand |
static int |
ADDOLD
dev card action ADDOLD: Add as old to player's hand |
private int |
cardType
The type of development card, like SOCDevCardConstants.ROADS |
static int |
DRAW
dev card action DRAW: Add as new to player's hand |
private java.lang.String |
game
Name of game |
static int |
PLAY
dev card action PLAY: remove as old from player's hand |
private int |
playerNumber
Player number |
| Constructor Summary | |
SOCDevCard(java.lang.String ga,
int pn,
int ac,
int ct)
Create a DevCard message. |
|
| Method Summary | |
int |
getAction()
|
int |
getCardType()
|
java.lang.String |
getGame()
|
int |
getPlayerNumber()
|
static SOCDevCard |
parseDataStr(java.lang.String s)
Parse the command String into a DevCard message |
java.lang.String |
toCmd()
DEVCARD sep game sep2 playerNumber sep2 actionType sep2 cardType |
static java.lang.String |
toCmd(java.lang.String ga,
int pn,
int ac,
int ct)
DEVCARD sep game sep2 playerNumber sep2 actionType sep2 cardType |
java.lang.String |
toString()
Simple human-readable representation, used for debug purposes. |
| Methods inherited from class soc.message.SOCMessage |
getMaximumVersion, getMinimumVersion, getType, toMsg, toSingleElemArray |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int DRAW
public static final int PLAY
public static final int ADDNEW
public static final int ADDOLD
private java.lang.String game
private int playerNumber
private int cardType
SOCDevCardConstants.ROADS
private int actionType
| Constructor Detail |
public SOCDevCard(java.lang.String ga,
int pn,
int ac,
int ct)
ga - name of the gamepn - the player numberac - the type of actionct - the type of card, like SOCDevCardConstants.ROADS| Method Detail |
public java.lang.String getGame()
public int getPlayerNumber()
public int getAction()
DRAWpublic int getCardType()
SOCDevCardConstants.ROADSpublic java.lang.String toCmd()
toCmd in class SOCMessage
public static java.lang.String toCmd(java.lang.String ga,
int pn,
int ac,
int ct)
ga - the game namepn - the player numberac - the type of actionct - the type of card
public static SOCDevCard 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 | ||||||||||