made all notifications constructors public

This commit is contained in:
Fleischer Hanno
2024-11-30 11:24:46 +01:00
parent 67bb30d124
commit 4d6cd63a3d
16 changed files with 18 additions and 29 deletions

View File

@@ -12,7 +12,7 @@ public class ActivePlayerNotification extends Notification {
*/ */
private Color color; private Color color;
ActivePlayerNotification(Color color) { public ActivePlayerNotification(Color color) {
this.color = color; this.color = color;
} }

View File

@@ -7,6 +7,6 @@ public class CeremonyNotification extends Notification{
/** /**
* Constructor * Constructor
*/ */
CeremonyNotification() { public CeremonyNotification() {
} }
} }

View File

@@ -8,6 +8,6 @@ public class DiceNowNotification extends Notification {
/** /**
* Constructor. * Constructor.
*/ */
DiceNowNotification() { public DiceNowNotification() {
} }
} }

View File

@@ -13,7 +13,7 @@ public class DicingNotification extends Notification{
* Constructor. * Constructor.
* @param color The color of the player that diced. * @param color The color of the player that diced.
*/ */
DicingNotification(Color color) { public DicingNotification(Color color) {
this.color = color; this.color = color;
} }

View File

@@ -15,7 +15,7 @@ public class DrawCardNotification extends Notification {
* @param color the color of the player who drew the card * @param color the color of the player who drew the card
* @param card the card that was drawn * @param card the card that was drawn
*/ */
DrawCardNotification(Color color, BonusCard card) { public DrawCardNotification(Color color, BonusCard card) {
this.color = color; this.color = color;
this.card = card; this.card = card;
} }

View File

@@ -7,6 +7,6 @@ public class GameNotification extends Notification{
/** /**
* Constructor * Constructor
*/ */
GameNotification() { public GameNotification() {
} }
} }

View File

@@ -16,7 +16,7 @@ public class HomeMoveNotification extends Notification {
* @param pieceId the piece id * @param pieceId the piece id
* @param homeIndex the home index * @param homeIndex the home index
*/ */
HomeMoveNotification(UUID pieceId, int homeIndex) { public HomeMoveNotification(UUID pieceId, int homeIndex) {
this.pieceId = pieceId; this.pieceId = pieceId;
this.homeIndex = homeIndex; this.homeIndex = homeIndex;
} }

View File

@@ -10,14 +10,14 @@ public class InterruptNotification extends Notification {
private Color color; private Color color;
/** /**
* @param color the color of the player who drew the card * @param color the color of the player who disconnected
*/ */
InterruptNotification(Color color) { public InterruptNotification(Color color) {
this.color = color; this.color = color;
} }
/** /**
* @return the color of the player who drew the card * @return the color of the player who disconnected
*/ */
public Color getColor() { public Color getColor() {
return color; return color;

View File

@@ -7,6 +7,6 @@ public class LobbyDialogNotification extends Notification{
/** /**
* Constructor * Constructor
*/ */
LobbyDialogNotification() { public LobbyDialogNotification() {
} }
} }

View File

@@ -16,7 +16,7 @@ public class PlayCardNotification extends Notification {
* @param color the color of the player that played the card. * @param color the color of the player that played the card.
* @param card the card that was played. * @param card the card that was played.
*/ */
PlayCardNotification(Color color, BonusCard card) { public PlayCardNotification(Color color, BonusCard card) {
this.color = color; this.color = color;
this.card = card; this.card = card;
} }

View File

@@ -13,7 +13,7 @@ public class ResumeNotification extends Notification {
* Constructor. * Constructor.
* @param color the color of the player that is in the game. * @param color the color of the player that is in the game.
*/ */
ResumeNotification(Color color) { public ResumeNotification(Color color) {
this.color = color; this.color = color;
} }

View File

@@ -17,7 +17,7 @@ public class RollDiceNotification extends Notification{
* @param eyes the number of eyes that were rolled. * @param eyes the number of eyes that were rolled.
* @param moveNumber the number of the move that was made. * @param moveNumber the number of the move that was made.
*/ */
RollDiceNotification(Color color, int eyes, int moveNumber) { public RollDiceNotification(Color color, int eyes, int moveNumber) {
this.color = color; this.color = color;
this.eyes = eyes; this.eyes = eyes;
this.moveNumber = moveNumber; this.moveNumber = moveNumber;

View File

@@ -14,7 +14,7 @@ public class SelectableCardsNotification extends Notification {
* Constructor. * Constructor.
* @param cards The list of cards that the player can choose from. * @param cards The list of cards that the player can choose from.
*/ */
SelectableCardsNotification(List<BonusCard> cards) { public SelectableCardsNotification(List<BonusCard> cards) {
this.cards = cards; this.cards = cards;
} }

View File

@@ -7,6 +7,6 @@ public class StartDialogNotification extends Notification{
/** /**
* Constructor * Constructor
*/ */
StartDialogNotification() { public StartDialogNotification() {
} }
} }

View File

@@ -9,18 +9,15 @@ public class TskSelectNotification extends Notification{
private Color color; private Color color;
private String name; private String name;
private boolean self;
/** /**
* Constructor. * Constructor.
* @param color the color of the player that is in the game. * @param color the color of the player that is in the game.
* @param name the name of the player that is in the game. * @param name the name of the player that is in the game.
* @param self true if it was the local player selecting the tsk, false otherwise
*/ */
TskSelectNotification(Color color, String name, boolean self) { public TskSelectNotification(Color color, String name) {
this.color = color; this.color = color;
this.name = name; this.name = name;
this.self = self;
} }
/** /**
@@ -38,12 +35,4 @@ public Color getColor() {
public String getName() { public String getName() {
return name; return name;
} }
/**
* Tells if it was the local player selecting this tsk.
* @return ture if it was the local player selecting the tsk.
*/
public boolean isSelf() {
return self;
}
} }

View File

@@ -10,7 +10,7 @@ public class TskUnselectNotification extends Notification{
* Constructor * Constructor
* @param color * @param color
*/ */
TskUnselectNotification(Color color){ public TskUnselectNotification(Color color){
this.color = color; this.color = color;
} }