diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/events/GameEvent.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/events/GameEvent.java index a69a688..57ff1aa 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/events/GameEvent.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/events/GameEvent.java @@ -9,15 +9,15 @@ import java.util.Objects; /** Represents a game event for: {@link EventType#RoundSetupEvent}, {@link EventType#TurnEvent}, {@link EventType#WinEvent}, {@link EventType#TurnTimeoutEvent}, {@link EventType#TimeoutWarningEvent}, {@link EventType#TimeoutEvent}, {@link EventType#DisconnectEvent}. */ public class GameEvent extends Event { - public int roundCount; - public int turnCount; + public Integer roundCount; + public Integer turnCount; public EntityID[] characterOrder; public EntityID nextCharacter; - public int playerWon; + public Integer playerWon; public String message; - public int timeLeft; + public Integer timeLeft; @Override public boolean equals(Object o) { @@ -25,7 +25,7 @@ public class GameEvent extends Event { if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; GameEvent gameEvent = (GameEvent) o; - return roundCount == gameEvent.roundCount && turnCount == gameEvent.turnCount && playerWon == gameEvent.playerWon && timeLeft == gameEvent.timeLeft && Arrays.equals(characterOrder, gameEvent.characterOrder) && Objects.equals(nextCharacter, gameEvent.nextCharacter) && Objects.equals(message, gameEvent.message); + return Objects.equals(roundCount, gameEvent.roundCount) && Objects.equals(turnCount, gameEvent.turnCount) && Objects.equals(playerWon, gameEvent.playerWon) && Objects.equals(timeLeft, gameEvent.timeLeft) && Arrays.equals(characterOrder, gameEvent.characterOrder) && Objects.equals(nextCharacter, gameEvent.nextCharacter) && Objects.equals(message, gameEvent.message); } @Override diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/events/GameStateEvent.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/events/GameStateEvent.java index 348dfef..2c0c656 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/events/GameStateEvent.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/events/GameStateEvent.java @@ -11,7 +11,7 @@ public class GameStateEvent extends Event { public Entity[] entities; public EntityID[] turnOrder; public EntityID activeCharacter; - public boolean winCondition; + public Boolean winCondition; @Override public boolean equals(Object o) {