fix: changed visibility of message vars to public

This commit is contained in:
Yannik Bretschneider 2021-06-03 16:20:23 +02:00
parent 3daef53f21
commit 00fd033b61
12 changed files with 25 additions and 25 deletions

View File

@ -8,20 +8,20 @@ package uulm.teamname.marvelous.gamelibrary.messages;
public class BasicMessage { public class BasicMessage {
/** The messageType describes the type of message that might be sent */ /** The messageType describes the type of message that might be sent */
MessageType messageType; public MessageType messageType;
/** I have no idea what this might be used for, even less the boolean in the answer */ /** I have no idea what this might be used for, even less the boolean in the answer */
String optionals; public String optionals;
/** /**
* <b>Exists only in a HelloClient message.</b> * <b>Exists only in a HelloClient message.</b>
* Describes whether the user was in a running game before reconnecting. * Describes whether the user was in a running game before reconnecting.
*/ */
boolean runningGame; public Boolean runningGame;
/** /**
* <b>Exists only in GameAssignment and GeneralAssignment messages.</b> * <b>Exists only in GameAssignment and GeneralAssignment messages.</b>
* Used for notifying the player of which party they have been assigned to * Used for notifying the player of which party they have been assigned to
*/ */
String gameID; public String gameID;
} }

View File

@ -6,5 +6,5 @@ public class CharacterSelectionMessage extends BasicMessage {
* Boolean array that conveys information about what characters (6) * Boolean array that conveys information about what characters (6)
* of the given characters (12) have been selected * of the given characters (12) have been selected
*/ */
Boolean[] characters; public Boolean[] characters;
} }

View File

@ -3,5 +3,5 @@ package uulm.teamname.marvelous.gamelibrary.messages;
public class ConfirmSelectionMessage extends BasicMessage { public class ConfirmSelectionMessage extends BasicMessage {
/** Whether the other player is also done with the selection already */ /** Whether the other player is also done with the selection already */
Boolean selectionComplete; public Boolean selectionComplete;
} }

View File

@ -3,8 +3,8 @@ package uulm.teamname.marvelous.gamelibrary.messages;
public class ErrorMessage extends BasicMessage{ public class ErrorMessage extends BasicMessage{
/** Some message telling the client what went wrong */ /** Some message telling the client what went wrong */
String message; public String message;
/** The type of the error that happened */ /** The type of the error that happened */
int type; public int type;
} }

View File

@ -5,8 +5,8 @@ import uulm.teamname.marvelous.gamelibrary.config.CharacterConfig;
public class GameAssignmentMessage extends BasicMessage { public class GameAssignmentMessage extends BasicMessage {
/** The ID of the game that the client is connected to. What this is used for is kind of unknown. */ /** The ID of the game that the client is connected to. What this is used for is kind of unknown. */
String gameID; public String gameID;
/** The characters the player can choose from */ /** The characters the player can choose from */
CharacterConfig[] characterSelection; public CharacterConfig[] characterSelection;
} }

View File

@ -12,26 +12,26 @@ import java.util.stream.Stream;
public class GameStructureMessage extends BasicMessage { public class GameStructureMessage extends BasicMessage {
// TODO: ADD ENUM FOR THIS // TODO: ADD ENUM FOR THIS
String assignment; public String assignment;
/** The name of the first player */ /** The name of the first player */
String playerOneName; public String playerOneName;
/** The name of the second player */ /** The name of the second player */
String playerTwoName; public String playerTwoName;
/** The characters that the first player has chosen (and is therefore playing with in this match) */ /** The characters that the first player has chosen (and is therefore playing with in this match) */
CharacterProperties[] playerOneCharacters; public CharacterProperties[] playerOneCharacters;
/** The characters that the second player has chosen (and is therefore playing with in this match) */ /** The characters that the second player has chosen (and is therefore playing with in this match) */
CharacterProperties[] playerTwoCharacters; public CharacterProperties[] playerTwoCharacters;
/** The {@link PartyConfig Party Configuration} of the current match */ /** The {@link PartyConfig Party Configuration} of the current match */
PartyConfig matchconfig; public PartyConfig matchconfig;
/** The {@link ScenarioConfig Scenario Configuration} of the current scenario */ /** The {@link ScenarioConfig Scenario Configuration} of the current scenario */
ScenarioConfig scenarioconfig; public ScenarioConfig scenarioconfig;
@JsonIgnore public CharacterConfig getCharacterConfig() { @JsonIgnore public CharacterConfig getCharacterConfig() {
CharacterConfig characterConfig = new CharacterConfig(); CharacterConfig characterConfig = new CharacterConfig();

View File

@ -3,5 +3,5 @@ package uulm.teamname.marvelous.gamelibrary.messages;
public class GeneralAssignmentMessage extends BasicMessage { public class GeneralAssignmentMessage extends BasicMessage {
/** The ID of the game that the client is connected to. What this is used for is kind of unknown. */ /** The ID of the game that the client is connected to. What this is used for is kind of unknown. */
String gameID; public String gameID;
} }

View File

@ -3,5 +3,5 @@ package uulm.teamname.marvelous.gamelibrary.messages;
public class GoodbyeClientMessage extends BasicMessage { public class GoodbyeClientMessage extends BasicMessage {
/** A message sent to the client on disconnect */ /** A message sent to the client on disconnect */
String message; public String message;
} }

View File

@ -2,5 +2,5 @@ package uulm.teamname.marvelous.gamelibrary.messages;
public class HelloClientMessage extends BasicMessage { public class HelloClientMessage extends BasicMessage {
/** Whether there is a running game that the player disconnected from */ /** Whether there is a running game that the player disconnected from */
Boolean runningGame; public Boolean runningGame;
} }

View File

@ -3,8 +3,8 @@ package uulm.teamname.marvelous.gamelibrary.messages;
public class HelloServerMessage extends BasicMessage{ public class HelloServerMessage extends BasicMessage{
/** User-chosen name, basically a PlayerName */ /** User-chosen name, basically a PlayerName */
String name; public String name;
/** Device ID sent by the Client, might be anything, but used together with name to uniquely identify the client */ /** Device ID sent by the Client, might be anything, but used together with name to uniquely identify the client */
String deviceID; public String deviceID;
} }

View File

@ -3,8 +3,8 @@ package uulm.teamname.marvelous.gamelibrary.messages;
public class PlayerReadyMessage extends BasicMessage { public class PlayerReadyMessage extends BasicMessage {
/** Whether the client wants to start the game. If this is false, the client gets disconnected. */ /** Whether the client wants to start the game. If this is false, the client gets disconnected. */
Boolean startGame; public Boolean startGame;
/** The {@link RoleEnum Role} the client wants to take */ /** The {@link RoleEnum Role} the client wants to take */
RoleEnum role; public RoleEnum role;
} }

View File

@ -3,5 +3,5 @@ package uulm.teamname.marvelous.gamelibrary.messages;
public class ReconnectMessage { public class ReconnectMessage {
/** Whether the client wants to reconnect to the previously running game */ /** Whether the client wants to reconnect to the previously running game */
Boolean reconnect; public Boolean reconnect;
} }