added 4 more Notifications for Model -> View interaction
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package pp.mdga.notification;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Notification that a piece has no shield.
|
||||
*/
|
||||
public class NoShieldNotification extends Notification{
|
||||
|
||||
private UUID pieceId;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param pieceId the id of the piece that has no shield.
|
||||
*/
|
||||
public NoShieldNotification(UUID pieceId) {
|
||||
this.pieceId = pieceId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the id of the piece that has no shield.
|
||||
* @return the id of the piece that has no shield.
|
||||
*/
|
||||
public UUID getPieceId() {
|
||||
return pieceId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package pp.mdga.notification;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* This class will be used to hold all ShieldActiveNotification relevant data.
|
||||
*/
|
||||
public class ShieldActiveNotification extends Notification{
|
||||
|
||||
private UUID pieceId;
|
||||
|
||||
/**
|
||||
* This constructor is used to create a new ShieldActiveNotification
|
||||
*
|
||||
* @param pieceId the pieceId
|
||||
*/
|
||||
public ShieldActiveNotification(UUID pieceId) {
|
||||
this.pieceId = pieceId;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns the pieceId
|
||||
*
|
||||
* @return the pieceId
|
||||
*/
|
||||
public UUID getPieceId() {
|
||||
return pieceId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package pp.mdga.notification;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* This class will be used to hold all ShieldSuppressedNotification relevant data.
|
||||
*/
|
||||
public class ShieldSuppressedNotification extends Notification {
|
||||
|
||||
private UUID pieceId;
|
||||
|
||||
/**
|
||||
* This constructor is used to create a new ShieldSuppressedNotification
|
||||
*
|
||||
* @param pieceId the pieceId
|
||||
*/
|
||||
public ShieldSuppressedNotification(UUID pieceId) {
|
||||
this.pieceId = pieceId;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns the pieceId
|
||||
*
|
||||
* @return the pieceId
|
||||
*/
|
||||
public UUID getPieceId() {
|
||||
return pieceId;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user