Merge branch 'development' into 'dev/test'

merge dev into test

See merge request progproj/gruppen-ht24/Gruppe-01!28
This commit was merged in pull request #28.
This commit is contained in:
Benjamin Feyer
2024-12-01 22:11:24 +00:00
106 changed files with 728 additions and 127064 deletions

View File

@@ -12,6 +12,7 @@
import pp.mdga.message.server.UpdateReadyMessage;
import pp.mdga.message.server.UpdateTSKMessage;
import pp.mdga.notification.LobbyReadyNotification;
import pp.mdga.notification.StartDialogNotification;
import pp.mdga.notification.TskSelectNotification;
import pp.mdga.notification.TskUnselectNotification;
@@ -36,6 +37,7 @@ public void exit() {
@Override
public void selectLeave() {
parent.setState(parent.getStartDialog());
logic.addNotification(new StartDialogNotification());
logic.send(new LeaveGameMessage());
}
@@ -72,6 +74,7 @@ public void selectStart(){
@Override
public void received(ServerStartGameMessage msg){
parent.startGame();
}

View File

@@ -34,7 +34,7 @@ public void received(CeremonyMessage msg){
@Override
public void received(DieMessage msg){
logic.getGame().setDiceEyes(msg.getDiceEye());
logic.addNotification(new RollDiceNotification(logic.getGame().getActiveColor(), logic.getGame().getDiceEyes(), logic.getGame().getDiceEyes() * logic.getGame().getDiceModifier()));
// logic.addNotification(new RollDiceNotification(logic.getGame().getActiveColor(), logic.getGame().getDiceEyes(), logic.getGame().getDiceEyes() * logic.getGame().getDiceModifier()));
if(msg.getDiceEye() == 6){
logic.getGame().getPlayerByColor(logic.getGame().getActiveColor()).getPlayerStatistic().increaseDiced6();
logic.getGame().getGameStatistics().increaseDiced6();

View File

@@ -40,7 +40,7 @@ public void received(DiceNowMessage msg){
@Override
public void received(DieMessage msg){
logic.getGame().setDiceEyes(msg.getDiceEye());
logic.addNotification(new RollDiceNotification(logic.getGame().getActiveColor(), logic.getGame().getDiceEyes(), logic.getGame().getDiceEyes() * logic.getGame().getDiceModifier()));
// logic.addNotification(new RollDiceNotification(logic.getGame().getActiveColor(), logic.getGame().getDiceEyes(), logic.getGame().getDiceEyes() * logic.getGame().getDiceModifier()));
if(msg.getDiceEye() == 6){
logic.getGame().getPlayerByColor(logic.getGame().getActiveColor()).getPlayerStatistic().increaseDiced6();
logic.getGame().getGameStatistics().increaseDiced6();

View File

@@ -7,34 +7,15 @@
/**
* Notification that is sent when a card is acquired.
*/
public class AcquireCardNotification extends Notification {
/**
* The id of the card that was acquired.
*/
private final UUID cardId;
public class AcquireCardNotification extends Notification{
/**
* The bonus card that was acquired.
*/
private final BonusCard bonusCard;
private BonusCard bonusCard;
/**
* Constructor.
*
* @param cardId The id of the card that was acquired.
*/
public AcquireCardNotification(BonusCard bonusCard, UUID cardId) {
public AcquireCardNotification(BonusCard bonusCard) {
this.bonusCard = bonusCard;
this.cardId = cardId;
}
/**
* Get the id of the card that was acquired.
*
* @return The id of the card that was acquired.
*/
public UUID getCardId() {
return cardId;
}
public BonusCard getBonusCard() {

View File

@@ -1,12 +1,22 @@
package pp.mdga.notification;
import pp.mdga.game.Color;
/**
* GameNotification class
*/
public class GameNotification extends Notification {
public class GameNotification extends Notification{
private final Color ownColor;
/**
* Constructor
*/
public GameNotification() {
public GameNotification(Color ownColor) {
this.ownColor = ownColor;
}
public Color getOwnColor() {
return ownColor;
}
}

View File

@@ -5,38 +5,34 @@
/**
* Notification that a die has been rolled.
*/
public class RollDiceNotification extends Notification {
/**
* The color of the player that rolled the die.
*/
private final Color color;
public class RollDiceNotification extends Notification{
/**
* The number of eyes that were rolled.
*/
private final int eyes;
/**
* The number of the move that was made.
*/
private final int moveNumber;
private Color color;
private int eyes;
private boolean turbo;
private int multiplier;
/**
* Constructor.
*
* @param color the color of the player that rolled the die.
* @param eyes the number of eyes that were rolled.
* @param moveNumber the number of the move that was made.
* @param color the color of the player that rolled the die.
* @param eyes the number of eyes that were rolled.
*/
public RollDiceNotification(Color color, int eyes, int moveNumber) {
public RollDiceNotification(Color color, int eyes) {
this.color = color;
this.eyes = eyes;
this.moveNumber = moveNumber;
this.turbo = false;
this.multiplier = -1;
}
public RollDiceNotification(Color color, int eyes, boolean turbo, int multiplier) {
this.color = color;
this.eyes = eyes;
this.turbo = turbo;
this.multiplier = multiplier;
}
/**
* Get the color of the player that rolled the die.
*
* @return the color of the player that rolled the die.
*/
public Color getColor() {
@@ -45,19 +41,17 @@ public Color getColor() {
/**
* Get the number of eyes that were rolled.
*
* @return the number of eyes that were rolled.
*/
public int getEyes() {
return eyes;
}
/**
* Get the number of the move that was made.
*
* @return the number of the move that was made.
*/
public int getMoveNumber() {
return moveNumber;
public int getMultiplier() {
return multiplier;
}
public boolean isTurbo() {
return turbo;
}
}

View File

@@ -0,0 +1,16 @@
package pp.mdga.notification;
import java.util.List;
import java.util.UUID;
public class SelectableShieldNotification extends Notification{
private List<UUID> pieces;
public SelectableShieldNotification(List<UUID> pieces){
this.pieces = pieces;
}
public List<UUID> getPieces() {
return pieces;
}
}

View File

@@ -0,0 +1,4 @@
package pp.mdga.notification;
public class TurboActiveNotification extends Notification{
}

View File

@@ -174,9 +174,9 @@ public LobbyState getLobbyState() {
}
/**
* This method will be used to return gameState attribute of ServerGameLogic class.
* This method will be used to return gamestate attribute of ServerGameLogic class.
*
* @return gameState as a GameState object.
* @return gamestate as a GameState object.
*/
public GameState getGameState() {
return this.gameState;
@@ -192,9 +192,9 @@ public InterruptState getInterruptState() {
}
/**
* This method will be used to return ceremonyState attribute of ServerGameLogic class.
* This method will be used to return ceremonystate attribute of ServerGameLogic class.
*
* @return ceremonyState as a CeremonyState object.
* @return ceremonystate as a CeremonyState object.
*/
public CeremonyState getCeremonyState() {
return this.ceremonyState;

View File

@@ -33,6 +33,6 @@ public void enter() {
*/
@Override
public void exit() {
LOGGER.log(System.Logger.Level.DEBUG, "Exited CeremonyState state.");
}
}

View File

@@ -55,7 +55,7 @@ public void enter() {
*/
@Override
public void exit() {
LOGGER.log(System.Logger.Level.DEBUG, "Exited GameState state.");
}
/**

View File

@@ -41,7 +41,7 @@ public void enter() {
*/
@Override
public void exit() {
LOGGER.log(System.Logger.Level.DEBUG, "Exited InterruptState state.");
}
/**

View File

@@ -40,12 +40,12 @@ public void enter() {
*/
@Override
public void exit() {
LOGGER.log(System.Logger.Level.DEBUG, "Exited LobbyState state.");
}
/**
* This method will be called whenever the server received a JoinedLobbyMessage message.
* It will also get the client id of the player who send this messag
* It will also get the client id of the player who send this message
*
* @param msg as the message which was sent by the player as a JoinedLobbyMessage object.
* @param from as the client id of the player as an Integer.
@@ -55,7 +55,9 @@ public void received(JoinedLobbyMessage msg, int from) {
Player player = new Player(msg.getName());
player.setColor(Color.getColorByIndex(this.logic.getGame().getPlayers().size()));
this.logic.getGame().addPlayer(from, player);
this.logic.getServerSender().broadcast(new LobbyPlayerJoinedMessage(from, player));
for (Map.Entry<Integer, Player> entry: this.logic.getGame().getPlayers().entrySet()) {
this.logic.getServerSender().broadcast(new LobbyPlayerJoinedMessage(entry.getKey(), entry.getValue()));
}
}
/**

View File

@@ -10,6 +10,11 @@
*
*/
public class AnimationState extends GameAutomatonState {
/**
* Create FirstRollState constants.
*/
private static final System.Logger LOGGER = System.getLogger(AnimationState.class.getName());
/**
* Constructs a server state of the specified game logic.
*
@@ -22,12 +27,12 @@ public AnimationState(GameState gameAutomaton, ServerGameLogic logic) {
@Override
public void enter() {
LOGGER.log(System.Logger.Level.DEBUG, "Entered AnimationState state.");
}
@Override
public void exit() {
LOGGER.log(System.Logger.Level.DEBUG, "Exited AnimationState state.");
}
/**

View File

@@ -5,6 +5,7 @@
import pp.mdga.message.server.DieMessage;
import pp.mdga.server.ServerGameLogic;
import pp.mdga.server.automaton.GameState;
import pp.mdga.server.automaton.game.turn.RollDiceState;
import java.util.HashMap;
import java.util.Map;
@@ -12,6 +13,11 @@
import java.util.stream.Collectors;
public class DetermineStartPlayerState extends GameAutomatonState {
/**
* Create FirstRollState constants.
*/
private static final System.Logger LOGGER = System.getLogger(DetermineStartPlayerState.class.getName());
/**
* Create DetermineStartPlayerState attributes.
*/
@@ -29,12 +35,12 @@ public DetermineStartPlayerState(GameState gameAutomaton, ServerGameLogic logic)
@Override
public void enter() {
LOGGER.log(System.Logger.Level.DEBUG, "Entered DetermineStartPlayerState state.");
}
@Override
public void exit() {
LOGGER.log(System.Logger.Level.DEBUG, "Exited DetermineStartPlayerState state.");
}
/**

View File

@@ -9,6 +9,10 @@
* It will also be used as the turn automaton.
*/
public class TurnState extends GameAutomatonState {
/**
* Create FirstRollState constants.
*/
private static final System.Logger LOGGER = System.getLogger(TurnState.class.getName());
/**
* Create TurnState states.
*/
@@ -36,12 +40,12 @@ public TurnState(GameState gameAutomaton, ServerGameLogic logic) {
@Override
public void enter() {
LOGGER.log(System.Logger.Level.DEBUG, "Entered TurnState state.");
}
@Override
public void exit() {
LOGGER.log(System.Logger.Level.DEBUG, "Exited TurnState state.");
}
/**

View File

@@ -4,6 +4,11 @@
import pp.mdga.server.automaton.game.TurnState;
public class ChoosePieceState extends TurnAutomatonState {
/**
* Create LobbyState constants.
*/
private static final System.Logger LOGGER = System.getLogger(ChoosePieceState.class.getName());
/**
* Constructs a server state of the specified game logic.
*
@@ -16,11 +21,11 @@ public ChoosePieceState(TurnState turnAutomaton, ServerGameLogic logic) {
@Override
public void enter() {
LOGGER.log(System.Logger.Level.DEBUG, "Exited ChoosePieceState state.");
}
@Override
public void exit() {
LOGGER.log(System.Logger.Level.DEBUG, "Entered ChoosePieceState state.");
}
}

View File

@@ -4,6 +4,10 @@
import pp.mdga.server.automaton.game.TurnState;
public class MovePieceState extends TurnAutomatonState {
/**
* Create LobbyState constants.
*/
private static final System.Logger LOGGER = System.getLogger(MovePieceState.class.getName());
/**
* Constructs a server state of the specified game logic.
@@ -17,11 +21,11 @@ public MovePieceState(TurnState turnAutomaton, ServerGameLogic logic) {
@Override
public void enter() {
LOGGER.log(System.Logger.Level.DEBUG, "Entered MovePieceState state.");
}
@Override
public void exit() {
LOGGER.log(System.Logger.Level.DEBUG, "Exited MovePieceState state.");
}
}

View File

@@ -1,9 +1,15 @@
package pp.mdga.server.automaton.game.turn;
import pp.mdga.server.ServerGameLogic;
import pp.mdga.server.automaton.game.AnimationState;
import pp.mdga.server.automaton.game.TurnState;
public class PlayPowerCardState extends TurnAutomatonState {
/**
* Create FirstRollState constants.
*/
private static final System.Logger LOGGER = System.getLogger(PlayPowerCardState.class.getName());
/**
* Constructs a server state of the specified game logic.
*
@@ -16,11 +22,11 @@ public PlayPowerCardState(TurnState turnAutomaton, ServerGameLogic logic) {
@Override
public void enter() {
LOGGER.log(System.Logger.Level.DEBUG, "Entered PlayPowerCardState state.");
}
@Override
public void exit() {
LOGGER.log(System.Logger.Level.DEBUG, "Exited PlayPowerCardState state.");
}
}

View File

@@ -1,9 +1,15 @@
package pp.mdga.server.automaton.game.turn;
import pp.mdga.server.ServerGameLogic;
import pp.mdga.server.automaton.game.AnimationState;
import pp.mdga.server.automaton.game.TurnState;
public class PowerCardState extends TurnAutomatonState {
/**
* Create FirstRollState constants.
*/
private static final System.Logger LOGGER = System.getLogger(PowerCardState.class.getName());
/**
* Constructs a server state of the specified game logic.
*
@@ -16,11 +22,11 @@ public PowerCardState(TurnState turnAutomaton, ServerGameLogic logic) {
@Override
public void enter() {
LOGGER.log(System.Logger.Level.DEBUG, "Exited PowerCardState state.");
}
@Override
public void exit() {
LOGGER.log(System.Logger.Level.DEBUG, "Entered PowerCardState state.");
}
}

View File

@@ -2,8 +2,25 @@
import pp.mdga.server.ServerGameLogic;
import pp.mdga.server.automaton.game.TurnState;
import pp.mdga.server.automaton.game.turn.rolldice.FirstRollState;
import pp.mdga.server.automaton.game.turn.rolldice.RollDiceAutomatonState;
import pp.mdga.server.automaton.game.turn.rolldice.SecondRollState;
import pp.mdga.server.automaton.game.turn.rolldice.ThirdRollState;
public class RollDiceState extends TurnAutomatonState {
/**
* Create FirstRollState constants.
*/
private static final System.Logger LOGGER = System.getLogger(RollDiceState.class.getName());
/**
* Create RollDiceState attributes.
*/
private RollDiceAutomatonState currentState;
private final FirstRollState firstRollState;
private final SecondRollState secondRollState;
private final ThirdRollState thirdRollState;
/**
* Constructs a server state of the specified game logic.
*
@@ -12,15 +29,68 @@ public class RollDiceState extends TurnAutomatonState {
*/
public RollDiceState(TurnState turnAutomaton, ServerGameLogic logic) {
super(turnAutomaton, logic);
this.firstRollState = new FirstRollState(this, logic);
this.secondRollState = new SecondRollState(this, logic);
this.thirdRollState = new ThirdRollState(this, logic);
}
@Override
public void enter() {
LOGGER.log(System.Logger.Level.DEBUG, "Entered RollDiceState state.");
}
@Override
public void exit() {
LOGGER.log(System.Logger.Level.DEBUG, "Exited RollDiceState state.");
}
/**
* This method will be used to return currentState attribute of RollDiceState class.
*
* @return currentState as a RollDiceAutomatonState object.
*/
public RollDiceAutomatonState getCurrentState() {
return this.currentState;
}
/**
* This method will be used to return firstRollState attribute of RollDiceState class.
*
* @return firstRollState as a FirstRollState object.
*/
public FirstRollState getFirstRollStateState() {
return this.firstRollState;
}
/**
* This method will be used to return secondRollState attribute of RollDiceState class.
*
* @return secondRollState as a SecondRollState object.
*/
public SecondRollState getSecondRollState() {
return this.secondRollState;
}
/**
* This method will be used to return currentState attribute of RollDiceState class.
*
* @return thirdRollState as a ThirdRollState object.
*/
public ThirdRollState getThirdRollState() {
return this.thirdRollState;
}
/**
* This method will be used to set currentState attribute of RollDiceState class to the given state parameter.
* In Addition, the currentState will be exited, changed and entered.
*
* @param state as the new currentState attribute as a RollDiceAutomatonState object.
*/
public void setCurrentState(RollDiceAutomatonState state) {
if (this.currentState != null) {
this.currentState.exit();
}
this.currentState = state;
this.currentState.enter();
}
}

View File

@@ -13,6 +13,7 @@ public abstract class ChoosePieceAutomatonState extends ServerState {
/**
* Constructs a server state of the specified game logic.
*
* @param choosePieceAutomaton as the automaton of the choose piece state as a ChoosePieceState object.
* @param logic the game logic
*/
public ChoosePieceAutomatonState(ChoosePieceState choosePieceAutomaton, ServerGameLogic logic) {

View File

@@ -3,5 +3,35 @@
import pp.mdga.server.ServerGameLogic;
import pp.mdga.server.automaton.game.turn.ChoosePieceState;
public class NoPieceState {
public class NoPieceState extends ChoosePieceAutomatonState {
/**
* Create FirstRollState constants.
*/
private static final System.Logger LOGGER = System.getLogger(NoPieceState.class.getName());
/**
* Constructs a server state of the specified game logic.
*
* @param choosePieceAutomaton as the automaton of the choose piece state as a ChoosePieceState object.
* @param logic the game logic
*/
public NoPieceState(ChoosePieceState choosePieceAutomaton, ServerGameLogic logic) {
super(choosePieceAutomaton, logic);
}
/**
* This method will be used whenever this state will be entered.
*/
@Override
public void enter() {
LOGGER.log(System.Logger.Level.DEBUG, "Entered NoPieceState state.");
}
/**
* This method will be used whenever this state will be exited.
*/
@Override
public void exit() {
LOGGER.log(System.Logger.Level.DEBUG, "Exited NoPieceState state.");
}
}

View File

@@ -3,5 +3,35 @@
import pp.mdga.server.ServerGameLogic;
import pp.mdga.server.automaton.game.turn.ChoosePieceState;
public class NoTurnState {
public class NoTurnState extends ChoosePieceAutomatonState {
/**
* Create FirstRollState constants.
*/
private static final System.Logger LOGGER = System.getLogger(NoTurnState.class.getName());
/**
* Constructs a server state of the specified game logic.
*
* @param choosePieceAutomaton as the automaton of the choose piece state as a ChoosePieceState object.
* @param logic the game logic
*/
public NoTurnState(ChoosePieceState choosePieceAutomaton, ServerGameLogic logic) {
super(choosePieceAutomaton, logic);
}
/**
* This method will be used whenever this state will be entered.
*/
@Override
public void enter() {
LOGGER.log(System.Logger.Level.DEBUG, "Entered NoTurnState state.");
}
/**
* This method will be used whenever this state will be exited.
*/
@Override
public void exit() {
LOGGER.log(System.Logger.Level.DEBUG, "Exited NoTurnState state.");
}
}

View File

@@ -3,6 +3,35 @@
import pp.mdga.server.ServerGameLogic;
import pp.mdga.server.automaton.game.turn.ChoosePieceState;
public class SelectPieceState {
public class SelectPieceState extends ChoosePieceAutomatonState {
/**
* Create FirstRollState constants.
*/
private static final System.Logger LOGGER = System.getLogger(SelectPieceState.class.getName());
/**
* Constructs a server state of the specified game logic.
*
* @param choosePieceAutomaton as the automaton of the choose piece state as a ChoosePieceState object.
* @param logic the game logic
*/
public SelectPieceState(ChoosePieceState choosePieceAutomaton, ServerGameLogic logic) {
super(choosePieceAutomaton, logic);
}
/**
* This method will be used whenever this state will be entered.
*/
@Override
public void enter() {
LOGGER.log(System.Logger.Level.DEBUG, "Entered SelectPieceState state.");
}
/**
* This method will be used whenever this state will be exited.
*/
@Override
public void exit() {
LOGGER.log(System.Logger.Level.DEBUG, "Exited SelectPieceState state.");
}
}

View File

@@ -3,5 +3,35 @@
import pp.mdga.server.ServerGameLogic;
import pp.mdga.server.automaton.game.turn.ChoosePieceState;
public class StartPieceState {
public class StartPieceState extends ChoosePieceAutomatonState {
/**
* Create FirstRollState constants.
*/
private static final System.Logger LOGGER = System.getLogger(StartPieceState.class.getName());
/**
* Constructs a server state of the specified game logic.
*
* @param choosePieceAutomaton as the automaton of the choose piece state as a ChoosePieceState object.
* @param logic the game logic
*/
public StartPieceState(ChoosePieceState choosePieceAutomaton, ServerGameLogic logic) {
super(choosePieceAutomaton, logic);
}
/**
* This method will be used whenever this state will be entered.
*/
@Override
public void enter() {
LOGGER.log(System.Logger.Level.DEBUG, "Exited StartPieceState state.");
}
/**
* This method will be used whenever this state will be exited.
*/
@Override
public void exit() {
LOGGER.log(System.Logger.Level.DEBUG, "Entered StartPieceState state.");
}
}

View File

@@ -2,6 +2,37 @@
import pp.mdga.server.ServerGameLogic;
import pp.mdga.server.automaton.game.turn.ChoosePieceState;
import pp.mdga.server.automaton.game.turn.rolldice.FirstRollState;
public class WaitingPieceState {
public class WaitingPieceState extends ChoosePieceAutomatonState {
/**
* Create FirstRollState constants.
*/
private static final System.Logger LOGGER = System.getLogger(WaitingPieceState.class.getName());
/**
* Constructs a server state of the specified game logic.
*
* @param choosePieceAutomaton as the automaton of the choose piece state as a ChoosePieceState object.
* @param logic the game logic
*/
public WaitingPieceState(ChoosePieceState choosePieceAutomaton, ServerGameLogic logic) {
super(choosePieceAutomaton, logic);
}
/**
* This method will be used whenever this state will be entered.
*/
@Override
public void enter() {
LOGGER.log(System.Logger.Level.DEBUG, "Entered WaitingPieceState state.");
}
/**
* This method will be used whenever this state will be exited.
*/
@Override
public void exit() {
LOGGER.log(System.Logger.Level.DEBUG, "Exited WaitingPieceState state.");
}
}

View File

@@ -0,0 +1,31 @@
package pp.mdga.server.automaton.game.turn.rolldice;
import pp.mdga.server.ServerGameLogic;
import pp.mdga.server.automaton.game.turn.RollDiceState;
public class FirstRollState extends RollDiceAutomatonState {
/**
* Create FirstRollState constants.
*/
private static final System.Logger LOGGER = System.getLogger(FirstRollState.class.getName());
/**
* Constructs a server state of the specified game logic.
*
* @param rollDiceAutomaton as the automaton of the roll dice state as a RollDiceState object.
* @param logic the game logic
*/
public FirstRollState(RollDiceState rollDiceAutomaton, ServerGameLogic logic) {
super(rollDiceAutomaton, logic);
}
@Override
public void enter() {
LOGGER.log(System.Logger.Level.DEBUG, "Entered FirstRollState state.");
}
@Override
public void exit() {
LOGGER.log(System.Logger.Level.DEBUG, "Exited FirstRollState state.");
}
}

View File

@@ -1,7 +0,0 @@
package pp.mdga.server.automaton.game.turn.rolldice;
import pp.mdga.server.ServerGameLogic;
import pp.mdga.server.automaton.game.turn.RollDiceState;
public class FirstRollStateState {
}

View File

@@ -13,7 +13,8 @@ public abstract class RollDiceAutomatonState extends ServerState {
/**
* Constructs a server state of the specified game logic.
*
* @param logic the game logic
* @param rollDiceAutomaton as the automaton of the roll dice state as a RollDiceState object.
* @param logic the game logic
*/
public RollDiceAutomatonState(RollDiceState rollDiceAutomaton, ServerGameLogic logic) {
super(logic);

View File

@@ -3,5 +3,29 @@
import pp.mdga.server.ServerGameLogic;
import pp.mdga.server.automaton.game.turn.RollDiceState;
public class SecondRollState {
public class SecondRollState extends RollDiceAutomatonState {
/**
* Create FirstRollState constants.
*/
private static final System.Logger LOGGER = System.getLogger(SecondRollState.class.getName());
/**
* Constructs a server state of the specified game logic.
*
* @param rollDiceAutomaton as the automaton of the roll dice state as a RollDiceState object.
* @param logic the game logic
*/
public SecondRollState(RollDiceState rollDiceAutomaton, ServerGameLogic logic) {
super(rollDiceAutomaton, logic);
}
@Override
public void enter() {
LOGGER.log(System.Logger.Level.DEBUG, "Entered SecondRollState state.");
}
@Override
public void exit() {
LOGGER.log(System.Logger.Level.DEBUG, "Exited SecondRollState state.");
}
}

View File

@@ -3,5 +3,29 @@
import pp.mdga.server.ServerGameLogic;
import pp.mdga.server.automaton.game.turn.RollDiceState;
public class ThirdRollState {
public class ThirdRollState extends RollDiceAutomatonState {
/**
* Create FirstRollState constants.
*/
private static final System.Logger LOGGER = System.getLogger(ThirdRollState.class.getName());
/**
* Constructs a server state of the specified game logic.
*
* @param rollDiceAutomaton as the automaton of the roll dice state as a RollDiceState object.
* @param logic the game logic
*/
public ThirdRollState(RollDiceState rollDiceAutomaton, ServerGameLogic logic) {
super(rollDiceAutomaton, logic);
}
@Override
public void enter() {
LOGGER.log(System.Logger.Level.DEBUG, "Exited ThirdRollState state.");
}
@Override
public void exit() {
LOGGER.log(System.Logger.Level.DEBUG, "Entered ThirdRollState state.");
}
}