Add notification constructors

This commit is contained in:
Felix
2024-11-14 19:33:03 +01:00
parent 5693817f9b
commit 6c7b58b415
11 changed files with 71 additions and 9 deletions

View File

@@ -1,4 +1,9 @@
package pp.mdga.notification;
public class ActivePlayerNotification {
import pp.mdga.game.Color;
public class ActivePlayerNotification extends Notification {
ActivePlayerNotification(Color color) {
}
}

View File

@@ -1,4 +1,10 @@
package pp.mdga.notification;
public class DrawCardNotification {
import pp.mdga.game.Card;
import pp.mdga.game.Color;
public class DrawCardNotification extends Notification {
DrawCardNotification(Color color, Card card) {
}
}

View File

@@ -1,4 +1,9 @@
package pp.mdga.notification;
public class InterruptNotification {
import pp.mdga.game.Color;
public class InterruptNotification extends Notification {
InterruptNotification(Color color) {
}
}

View File

@@ -1,4 +1,9 @@
package pp.mdga.notification;
public class MovePieceNotification {
import pp.mdga.game.Color;
public class MovePieceNotification extends Notification {
MovePieceNotification(Color color, int nodeIndex) {
}
}

View File

@@ -1,4 +1,4 @@
package pp.mdga.notification;
public interface Notification {
public abstract class Notification {
}

View File

@@ -0,0 +1,11 @@
package pp.mdga.notification;
import pp.mdga.game.Color;
import java.util.UUID;
public class PieceInGameNotification extends Notification{
PieceInGameNotification(Color color, UUID id) {
}
}

View File

@@ -1,4 +1,10 @@
package pp.mdga.notification;
public class PlayCardNotification {
import pp.mdga.game.Card;
import pp.mdga.game.Color;
public class PlayCardNotification extends Notification {
PlayCardNotification(Color color, Card card) {
}
}

View File

@@ -0,0 +1,9 @@
package pp.mdga.notification;
import pp.mdga.game.Color;
public class PlayerInGameNotification extends Notification {
PlayerInGameNotification(Color color, String name) {
}
}

View File

@@ -1,4 +1,9 @@
package pp.mdga.notification;
public class ResumeNotification {
import pp.mdga.game.Color;
public class ResumeNotification extends Notification {
ResumeNotification(Color color) {
}
}

View File

@@ -1,4 +1,9 @@
package pp.mdga.notification;
public class RollDiceNotification {
import pp.mdga.game.Color;
public class RollDiceNotification extends Notification{
RollDiceNotification(Color color, int eyes, int moveNumber) {
}
}

View File

@@ -1,4 +1,9 @@
package pp.mdga.notification;
public class SwapPieceNotification {
import java.util.UUID;
public class SwapPieceNotification extends Notification {
SwapPieceNotification(UUID a, UUID b) {
assert(!a.equals(b));
}
}