|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsoc.message.SOCMessage
soc.message.SOCDiscard
public class SOCDiscard
This message means that a player is discarding.
Client's response to server's SOCDiscardRequest.
The server will report the discard's resource total to the other
players via SOCPlayerElement and text, but will not send
a SOCDiscard message to other players.
| Field Summary | |
|---|---|
private java.lang.String |
game
Name of game |
private SOCResourceSet |
resources
The set of resources being discarded |
private static long |
serialVersionUID
|
| Constructor Summary | |
|---|---|
SOCDiscard(java.lang.String ga,
int cl,
int or,
int sh,
int wh,
int wo,
int uk)
Create a Discard message. |
|
SOCDiscard(java.lang.String ga,
int pn,
SOCResourceSet rs)
Create a Discard message. |
|
| Method Summary | |
|---|---|
java.lang.String |
getGame()
Name of game this message is for. |
SOCResourceSet |
getResources()
|
static SOCDiscard |
parseDataStr(java.lang.String s)
Parse the command String into a Discard message |
java.lang.String |
toCmd()
DISCARD sep game sep2 clay sep2 ore sep2 sheep sep2 wheat sep2 wood sep2 unknown |
static java.lang.String |
toCmd(java.lang.String ga,
int cl,
int or,
int sh,
int wh,
int wo,
int uk)
DISCARD sep game sep2 clay sep2 ore sep2 sheep sep2 wheat sep2 wood sep2 unknown |
static java.lang.String |
toCmd(java.lang.String ga,
SOCResourceSet rs)
DISCARD sep game sep2 clay sep2 ore sep2 sheep sep2 wheat sep2 wood sep2 unknown |
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 SOCResourceSet resources
| Constructor Detail |
|---|
public SOCDiscard(java.lang.String ga,
int cl,
int or,
int sh,
int wh,
int wo,
int uk)
ga - the name of the gamecl - the amount of clay being discardedor - the amount of ore being discardedsh - the amount of sheep being discardedwh - the amount of wheat being discardedwo - the amount of wood being discardeduk - the amount of unknown resources being discarded
public SOCDiscard(java.lang.String ga,
int pn,
SOCResourceSet rs)
ga - the name of the gamers - the resources being discarded| 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 SOCResourceSet getResources()
public java.lang.String toCmd()
toCmd in class SOCMessage
public static java.lang.String toCmd(java.lang.String ga,
SOCResourceSet rs)
ga - the name of the gamers - the resources being discarded
public static java.lang.String toCmd(java.lang.String ga,
int cl,
int or,
int sh,
int wh,
int wo,
int uk)
ga - the name of the gamecl - the amount of clay being discardedor - the amount of ore being discardedsh - the amount of sheep being discardedwh - the amount of wheat being discardedwo - the amount of wood being discardeduk - the amount of unknown resources being discarded
public static SOCDiscard 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 | |||||||||