fix: fixed wrong Variable type in GameAssignmentMessage

This commit is contained in:
Yannik Bretschneider 2021-06-03 17:48:38 +02:00
parent 788591268c
commit b8e13f295c

View File

@ -1,6 +1,10 @@
package uulm.teamname.marvelous.gamelibrary.messages;
import uulm.teamname.marvelous.gamelibrary.config.CharacterConfig;
import uulm.teamname.marvelous.gamelibrary.config.CharacterProperties;
import java.util.Arrays;
import java.util.Objects;
public class GameAssignmentMessage extends BasicMessage {
@ -8,5 +12,21 @@ public class GameAssignmentMessage extends BasicMessage {
public String gameID;
/** The characters the player can choose from */
public CharacterConfig[] characterSelection;
public CharacterProperties[] characterSelection;
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
GameAssignmentMessage that = (GameAssignmentMessage) o;
return Objects.equals(gameID, that.gameID) && Arrays.equals(characterSelection, that.characterSelection);
}
@Override
public int hashCode() {
int result = Objects.hash(super.hashCode(), gameID);
result = 31 * result + Arrays.hashCode(characterSelection);
return result;
}
}