|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object soc.message.SOCMessage soc.message.SOCMessageTemplate3i soc.message.SOCRemovePiece
public class SOCRemovePiece
This message from server announces a SOCShip removed from the board. Ships are removed when the player makes an attack on their Pirate Fortress and fails to win. Currently, no other piece types are removed in any scenario, but the message allows for other types in case that changes in a later version.
Param 1: Player number owning the piece
Param 2: Type of playing piece, such as SOCPlayingPiece.SHIP
Param 3: Coordinates of the piece to remove
(These parameters are in the same order as in SOCPutPiece.toCmd(String, int, int, int)
.)
Introduced in v2.0.00 for the pirate islands scenario (_SC_PIRI).
Field Summary | |
---|---|
private static long |
serialVersionUID
|
Fields inherited from class soc.message.SOCMessageTemplate3i |
---|
game, p1, p2, p3 |
Constructor Summary | |
---|---|
SOCRemovePiece(java.lang.String ga,
int pn,
int ptype,
int co)
Create a SOCRemovePiece message. |
|
SOCRemovePiece(java.lang.String ga,
SOCPlayingPiece pp)
Create a SOCRemovePiece message for this piece. |
Method Summary | |
---|---|
int |
getMinimumVersion()
Minimum version where this message type is used. |
static SOCRemovePiece |
parseDataStr(java.lang.String s)
Parse the command string into a SOCRemovePiece message. |
static java.lang.String |
toCmd(java.lang.String ga,
int pn,
int ptype,
int co)
REMOVEPIECE sep game sep2 pn sep2 ptype sep2 co |
Methods inherited from class soc.message.SOCMessageTemplate3i |
---|
getGame, getParam1, getParam2, getParam3, toCmd, toCmd, toString |
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 |
Methods inherited from interface soc.message.SOCMessageForGame |
---|
getType |
Field Detail |
---|
private static final long serialVersionUID
Constructor Detail |
---|
public SOCRemovePiece(java.lang.String ga, int pn, int ptype, int co)
ga
- the name of the gamepn
- player number owning the pieceptype
- type of playing piece, such as SOCPlayingPiece.SHIP
co
- coordinates of the piece to removepublic SOCRemovePiece(java.lang.String ga, SOCPlayingPiece pp)
ga
- the name of the gamepp
- the playing piece to removeMethod Detail |
---|
public static java.lang.String toCmd(java.lang.String ga, int pn, int ptype, int co)
ga
- the name of the gamepn
- player number owning the pieceptype
- type of playing piece, such as SOCPlayingPiece.SHIP
co
- coordinates of the piece to remove
public static SOCRemovePiece parseDataStr(java.lang.String s)
s
- the String to parse; format: game sep2 pn sep2 ptype sep2 co
public int getMinimumVersion()
getMinimumVersion
in class SOCMessage
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |