Merge remote-tracking branch 'origin/development' into development
This commit is contained in:
@@ -23,6 +23,13 @@ public DeselectTSK(Color color) {
|
|||||||
this.color = color;
|
this.color = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default constructor for serialization purposes.
|
||||||
|
*/
|
||||||
|
private DeselectTSK() {
|
||||||
|
color = null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the color associated with the TSK to be deselected.
|
* Returns the color associated with the TSK to be deselected.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -14,14 +14,23 @@ public class RequestMove extends ClientMessage {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for RequestMove
|
* Constructor for RequestMove
|
||||||
|
*
|
||||||
* @param pieceIdentifier the piece identifier
|
* @param pieceIdentifier the piece identifier
|
||||||
*/
|
*/
|
||||||
public RequestMove(String pieceIdentifier) {
|
public RequestMove(String pieceIdentifier) {
|
||||||
this.pieceIdentifier = pieceIdentifier;
|
this.pieceIdentifier = pieceIdentifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default constructor for serialization purposes.
|
||||||
|
*/
|
||||||
|
private RequestMove() {
|
||||||
|
pieceIdentifier = null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Getter for the piece identifier
|
* Getter for the piece identifier
|
||||||
|
*
|
||||||
* @return the piece identifier
|
* @return the piece identifier
|
||||||
*/
|
*/
|
||||||
public String getPieceIdentifier() {
|
public String getPieceIdentifier() {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class RequestPlayCard extends ClientMessage {
|
|||||||
/**
|
/**
|
||||||
* Constructs a new RequestPlayCard instance.
|
* Constructs a new RequestPlayCard instance.
|
||||||
*
|
*
|
||||||
* @param card the bonus card to be played
|
* @param card the bonus card to be played
|
||||||
* @param pieceIdentifier the identifier of the piece
|
* @param pieceIdentifier the identifier of the piece
|
||||||
*/
|
*/
|
||||||
public RequestPlayCard(BonusCard card, String pieceIdentifier) {
|
public RequestPlayCard(BonusCard card, String pieceIdentifier) {
|
||||||
@@ -29,6 +29,14 @@ public RequestPlayCard(BonusCard card, String pieceIdentifier) {
|
|||||||
this.card = card;
|
this.card = card;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default constructor for serialization purposes.
|
||||||
|
*/
|
||||||
|
private RequestPlayCard() {
|
||||||
|
card = null;
|
||||||
|
pieceIdentifier = null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the bonus card associated with this request.
|
* Gets the bonus card associated with this request.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -22,6 +22,13 @@ public SelectCard(BonusCard card) {
|
|||||||
this.card = card;
|
this.card = card;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default constructor for serialization purposes.
|
||||||
|
*/
|
||||||
|
private SelectCard() {
|
||||||
|
card = null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the bonus card associated with this selection.
|
* Gets the bonus card associated with this selection.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -3,15 +3,32 @@
|
|||||||
import com.jme3.network.serializing.Serializable;
|
import com.jme3.network.serializing.Serializable;
|
||||||
import pp.mdga.game.Color;
|
import pp.mdga.game.Color;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A message sent by a client to select a TSK.
|
||||||
|
*/
|
||||||
@Serializable
|
@Serializable
|
||||||
public class SelectTSK extends ClientMessage {
|
public class SelectTSK extends ClientMessage {
|
||||||
|
/**
|
||||||
|
* The color associated with the TSK to be selected.
|
||||||
|
*/
|
||||||
private final Color color;
|
private final Color color;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a new SelectTSK message with the specified color.
|
||||||
|
*
|
||||||
|
* @param color the color associated with the TSK to be selected
|
||||||
|
*/
|
||||||
public SelectTSK(Color color) {
|
public SelectTSK(Color color) {
|
||||||
this.color = color;
|
this.color = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default constructor for serialization purposes.
|
||||||
|
*/
|
||||||
|
private SelectTSK() {
|
||||||
|
color = null;
|
||||||
|
}
|
||||||
|
|
||||||
public Color getColor() {
|
public Color getColor() {
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,14 +14,23 @@ public class SelectedPieces extends ClientMessage {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for SelectedPieces
|
* Constructor for SelectedPieces
|
||||||
|
*
|
||||||
* @param pieceIdentifier the piece identifier
|
* @param pieceIdentifier the piece identifier
|
||||||
*/
|
*/
|
||||||
public SelectedPieces(String pieceIdentifier) {
|
public SelectedPieces(String pieceIdentifier) {
|
||||||
this.pieceIdentifier = pieceIdentifier;
|
this.pieceIdentifier = pieceIdentifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default constructor for serialization purposes.
|
||||||
|
*/
|
||||||
|
private SelectedPieces() {
|
||||||
|
pieceIdentifier = null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Getter for the piece identifier
|
* Getter for the piece identifier
|
||||||
|
*
|
||||||
* @return the piece identifier
|
* @return the piece identifier
|
||||||
*/
|
*/
|
||||||
public String getPieceIdentifier() {
|
public String getPieceIdentifier() {
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
*/
|
*/
|
||||||
@Serializable
|
@Serializable
|
||||||
public class ActivePlayer extends ServerMessage {
|
public class ActivePlayer extends ServerMessage {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The color of the active player.
|
* The color of the active player.
|
||||||
*/
|
*/
|
||||||
@@ -24,6 +23,13 @@ public ActivePlayer(Color color) {
|
|||||||
this.color = color;
|
this.color = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default constructor for serialization purposes.
|
||||||
|
*/
|
||||||
|
private ActivePlayer() {
|
||||||
|
color = null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Getter for the color of the active player
|
* Getter for the color of the active player
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -31,6 +31,14 @@ public Dice(int diceEye, List<String> moveablePieces) {
|
|||||||
this.moveablePieces = moveablePieces;
|
this.moveablePieces = moveablePieces;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default constructor for serialization purposes.
|
||||||
|
*/
|
||||||
|
private Dice() {
|
||||||
|
diceEye = 0;
|
||||||
|
moveablePieces = null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for inactivePlayer
|
* Constructor for inactivePlayer
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -23,6 +23,13 @@ public LobbyPlayerJoin(String name) {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default constructor for serialization purposes.
|
||||||
|
*/
|
||||||
|
private LobbyPlayerJoin() {
|
||||||
|
name = null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the name of the player joining the lobby.
|
* Returns the name of the player joining the lobby.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -30,6 +30,14 @@ public LobbyPlayerLeave(String name, Color color) {
|
|||||||
this.color = color;
|
this.color = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default constructor for serialization purposes.
|
||||||
|
*/
|
||||||
|
private LobbyPlayerLeave() {
|
||||||
|
name = null;
|
||||||
|
color = null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the name of the player leaving the lobby.
|
* Returns the name of the player leaving the lobby.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -22,6 +22,13 @@ public MoveMessage(String identifier) {
|
|||||||
this.pieceIdentifier = identifier;
|
this.pieceIdentifier = identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default constructor for serialization purposes.
|
||||||
|
*/
|
||||||
|
private MoveMessage() {
|
||||||
|
pieceIdentifier = null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the identifier of the piece that should be moved.
|
* Returns the identifier of the piece that should be moved.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -30,6 +30,14 @@ public PlayCard(BonusCard card, String pieceIdentifier) {
|
|||||||
this.pieceIdentifier = pieceIdentifier;
|
this.pieceIdentifier = pieceIdentifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default constructor for serialization purposes.
|
||||||
|
*/
|
||||||
|
private PlayCard() {
|
||||||
|
card = null;
|
||||||
|
pieceIdentifier = null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the card that should be played.
|
* Returns the card that should be played.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -21,6 +21,13 @@ public ReconnectBriefing(Game game) {
|
|||||||
this.game = game;
|
this.game = game;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default constructor for serialization purposes.
|
||||||
|
*/
|
||||||
|
private ReconnectBriefing() {
|
||||||
|
this(null);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the game.
|
* Returns the game.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -22,6 +22,14 @@ public StartPiece(String pieceIdentifier) {
|
|||||||
this.pieceIdentifier = pieceIdentifier;
|
this.pieceIdentifier = pieceIdentifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default constructor for serialization purposes.
|
||||||
|
*/
|
||||||
|
private StartPiece() {
|
||||||
|
super();
|
||||||
|
this.pieceIdentifier = "";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the identifier for the piece.
|
* Gets the identifier for the piece.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -30,6 +30,15 @@ public UpdateReady(Color color, boolean ready) {
|
|||||||
this.ready = ready;
|
this.ready = ready;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default constructor for serialization purposes.
|
||||||
|
*/
|
||||||
|
private UpdateReady() {
|
||||||
|
super();
|
||||||
|
this.color = null;
|
||||||
|
this.ready = false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the color associated with the update.
|
* Gets the color associated with the update.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -25,10 +25,18 @@ public class UpdateTSK extends ServerMessage {
|
|||||||
* @param color the color associated with the update
|
* @param color the color associated with the update
|
||||||
*/
|
*/
|
||||||
public UpdateTSK(String name, Color color) {
|
public UpdateTSK(String name, Color color) {
|
||||||
|
super();
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.color = color;
|
this.color = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default constructor for serialization purposes.
|
||||||
|
*/
|
||||||
|
private UpdateTSK() {
|
||||||
|
this("", null);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the name associated with the update.
|
* Gets the name associated with the update.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user