fix: changed event types to non-primitives for nullability
This commit is contained in:
parent
e6cc61a272
commit
326c469e55
@ -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}. */
|
/** 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 class GameEvent extends Event {
|
||||||
public int roundCount;
|
public Integer roundCount;
|
||||||
public int turnCount;
|
public Integer turnCount;
|
||||||
public EntityID[] characterOrder;
|
public EntityID[] characterOrder;
|
||||||
public EntityID nextCharacter;
|
public EntityID nextCharacter;
|
||||||
|
|
||||||
public int playerWon;
|
public Integer playerWon;
|
||||||
|
|
||||||
public String message;
|
public String message;
|
||||||
public int timeLeft;
|
public Integer timeLeft;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
@ -25,7 +25,7 @@ public class GameEvent extends Event {
|
|||||||
if (o == null || getClass() != o.getClass()) return false;
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
if (!super.equals(o)) return false;
|
if (!super.equals(o)) return false;
|
||||||
GameEvent gameEvent = (GameEvent) o;
|
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
|
@Override
|
||||||
|
@ -11,7 +11,7 @@ public class GameStateEvent extends Event {
|
|||||||
public Entity[] entities;
|
public Entity[] entities;
|
||||||
public EntityID[] turnOrder;
|
public EntityID[] turnOrder;
|
||||||
public EntityID activeCharacter;
|
public EntityID activeCharacter;
|
||||||
public boolean winCondition;
|
public Boolean winCondition;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
|
Loading…
Reference in New Issue
Block a user