added improved pieces model; added functionality to notifications + todos
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package pp.mdga.notification;
|
||||
|
||||
import pp.mdga.game.BonusCard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
@@ -8,12 +10,14 @@
|
||||
public class AcquireCardNotification extends Notification{
|
||||
|
||||
private UUID cardId;
|
||||
private BonusCard bonusCard;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param cardId The id of the card that was acquired.
|
||||
*/
|
||||
public AcquireCardNotification(UUID cardId) {
|
||||
public AcquireCardNotification(BonusCard bonusCard, UUID cardId) {
|
||||
this.bonusCard = bonusCard;
|
||||
this.cardId = cardId;
|
||||
}
|
||||
|
||||
@@ -24,4 +28,8 @@ public AcquireCardNotification(UUID cardId) {
|
||||
public UUID getCardId() {
|
||||
return cardId;
|
||||
}
|
||||
|
||||
public BonusCard getBonusCard() {
|
||||
return bonusCard;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
package pp.mdga.notification;
|
||||
|
||||
import pp.mdga.game.Color;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class MoveThrowPieceNotification extends Notification{
|
||||
|
||||
private UUID pieceId1;
|
||||
private UUID pieceId2;
|
||||
private int nodeIndex;
|
||||
private Color colorPiece2;
|
||||
|
||||
/**
|
||||
* This constructor is used to create a new MoveThrowPieceNotification
|
||||
*
|
||||
* @param pieceId1 the pieceId1
|
||||
* @param pieceId2 the pieceId2
|
||||
* @param nodeIndex the nodeIndex
|
||||
* @param colorPiece2 the color
|
||||
*/
|
||||
public MoveThrowPieceNotification(UUID pieceId1, UUID pieceId2, int nodeIndex, Color colorPiece2) {
|
||||
this.pieceId1 = pieceId1;
|
||||
this.pieceId2 = pieceId2;
|
||||
this.nodeIndex = nodeIndex;
|
||||
this.colorPiece2 = colorPiece2;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns the pieceId1
|
||||
*
|
||||
* @return the pieceId1
|
||||
*/
|
||||
public UUID getPieceId1() {
|
||||
return pieceId1;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns the pieceId2
|
||||
*
|
||||
* @return the pieceId2
|
||||
*/
|
||||
public UUID getPieceId2() {
|
||||
return pieceId2;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns the nodeIndex
|
||||
*
|
||||
* @return the nodeIndex
|
||||
*/
|
||||
public int getNodeIndex() {
|
||||
return nodeIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns the color
|
||||
*
|
||||
* @return the color
|
||||
*/
|
||||
public Color getColor() {
|
||||
return colorPiece2;
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package pp.mdga.notification;
|
||||
|
||||
import pp.mdga.game.Color;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Notification that a piece is in the game
|
||||
*/
|
||||
public class PieceInGameNotification extends Notification{
|
||||
private Color color;
|
||||
private UUID id;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param color the color of the piece
|
||||
* @param id the id of the piece
|
||||
*/
|
||||
PieceInGameNotification(Color color, UUID id) {
|
||||
this.color = color;
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the color of the piece
|
||||
*/
|
||||
public Color getColor() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the id of the piece
|
||||
*/
|
||||
public UUID getId() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package pp.mdga.notification;
|
||||
|
||||
import pp.mdga.game.Color;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class ThrowPieceNotification extends Notification{
|
||||
|
||||
private UUID pieceId;
|
||||
|
||||
/**
|
||||
* This constructor is used to create a new ThrowPieceNotification
|
||||
*
|
||||
* @param pieceId1 the pieceId1
|
||||
* @param pieceId2 the pieceId2
|
||||
* @param nodeIndex the nodeIndex
|
||||
* @param colorPiece2 the color
|
||||
*/
|
||||
public ThrowPieceNotification(UUID pieceId) {
|
||||
this.pieceId = pieceId;
|
||||
}
|
||||
|
||||
public UUID getPieceId() {
|
||||
return pieceId;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user